pub type Point = Vec2<f64>;
点(2次元平面)
pub struct Point(pub f64, pub f64);
0: f64
1: f64
2点間のユークリッド距離を求める
\|\boldsymbol{a} - \boldsymbol{b}\| = \sqrt{(a_x - b_x)^2 + (a_y - b_y)^2}
ノルムを求める
\|\boldsymbol{a}\| = \sqrt{a_x^2 + a_y^2}
同じ向きの単位ベクトルを求める
法線ベクトル (90度回転させたベクトル) を求める
原点周りに $\theta$ 回転させた点を求める
\theta