Type Alias munum::Vec2

source ·
pub type Vec2<T = f32> = Vector<T, 2>;
Expand description

A 2D vector

Aliased Type§

struct Vec2<T = f32>(/* private fields */);

Trait Implementations§

source§

impl<T: Copy + NumAssign> From<Matrix<T, 3, 1>> for Vec2<T>

source§

fn from(v: Vec3<T>) -> Self

Creates a Vec2 from the (x, y) of a Vec3

§Examples
let v = Vec2::from(Vec3::<i32>::from_slice(&[2, 3, 4]));
assert_eq!(*v.as_ref(), [2, 3]);