pub type Vector = Vector2D<f64, DrawingSpace>;
A 2D vector for working in DrawingSpace.
DrawingSpace
#[repr(C)]pub struct Vector { pub x: f64, pub y: f64, }
x: f64
y: f64
Calculates the Vector’s magnitude.
Vector
let vector = Vector::new(3.0, 4.0); assert_eq!(vector.length(), 5.0);