Vector2

Type Alias Vector2 

Source
pub type Vector2<T> = Vector<T, 2>;
Expand description

Type alias for 2d vector

Aliased Type§

pub struct Vector2<T> { /* private fields */ }

Implementations§

Source§

impl<T> Vector2<T>

Source

pub const fn new2(x: T, y: T) -> Self

Create a new 2D vector

let v = Vector::new2(1, 2);

assert_eq!(v.dimensions(), 2);