Type Alias Vec2

Source
pub type Vec2 = Vector2<i32>;

Aliased Type§

pub struct Vec2 {
    pub x: i32,
    pub y: i32,
}

Fields§

§x: i32§y: i32

Implementations§

Source§

impl Vec2

Source

pub const ZERO: Vec2

Source

pub const UNIT_X: Vec2

Source

pub const UNIT_Y: Vec2

Source

pub const ONE: Vec2

Trait Implementations§

Source§

impl AsMut<Vector2<i32>> for Vec2

Source§

fn as_mut(&mut self) -> &mut Vec2

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Vector2<i32>> for Vec2

Source§

fn as_ref(&self) -> &Vec2

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl From<Vector2<f32>> for Vec2

Source§

fn from(value: Vec2f) -> Self

Converts to this type from the input type.
Source§

impl Eq for Vec2