Expand description
Vector (as in linear algebra, not as in Vec
!) with two elements.
Fields
x: f32
y: f32
Implementations
impl Vec2
impl Vec2
pub fn as_mut_array(&mut self) -> &mut [f32; 2]
Trait Implementations
pub fn add_assign(&mut self, rhs: Vec2)
pub fn add_assign(&mut self, rhs: Vec2)
Performs the +=
operation. Read more
pub fn add_assign(&mut self, rhs: f32)
pub fn add_assign(&mut self, rhs: f32)
Performs the +=
operation. Read more
pub fn div_assign(&mut self, rhs: Vec2)
pub fn div_assign(&mut self, rhs: Vec2)
Performs the /=
operation. Read more
pub fn div_assign(&mut self, rhs: f32)
pub fn div_assign(&mut self, rhs: f32)
Performs the /=
operation. Read more
pub fn mul_assign(&mut self, rhs: Vec2)
pub fn mul_assign(&mut self, rhs: Vec2)
Performs the *=
operation. Read more
pub fn mul_assign(&mut self, rhs: f32)
pub fn mul_assign(&mut self, rhs: f32)
Performs the *=
operation. Read more
pub fn sub_assign(&mut self, rhs: Vec2)
pub fn sub_assign(&mut self, rhs: Vec2)
Performs the -=
operation. Read more
pub fn sub_assign(&mut self, rhs: f32)
pub fn sub_assign(&mut self, rhs: f32)
Performs the -=
operation. Read more
impl StructuralPartialEq for Vec2
Auto Trait Implementations
impl RefUnwindSafe for Vec2
impl UnwindSafe for Vec2
Blanket Implementations
Mutably borrows from an owned value. Read more