pub struct Vec2 {
pub x: f32,
pub y: f32,
}
Expand description
Struct representing a vector or a point in 2D space.
Fields§
§x: f32
§y: f32
Implementations§
Trait Implementations§
source§impl AddAssign<Vec2> for Keypoint
impl AddAssign<Vec2> for Keypoint
source§fn add_assign(&mut self, rhs: Vec2)
fn add_assign(&mut self, rhs: Vec2)
Performs the
+=
operation. Read moresource§impl AddAssign<Vec2> for Vec2
impl AddAssign<Vec2> for Vec2
source§fn add_assign(&mut self, rhs: Vec2)
fn add_assign(&mut self, rhs: Vec2)
Performs the
+=
operation. Read moresource§impl AddAssign<f32> for Vec2
impl AddAssign<f32> for Vec2
source§fn add_assign(&mut self, rhs: f32)
fn add_assign(&mut self, rhs: f32)
Performs the
+=
operation. Read moresource§impl DivAssign<f32> for Vec2
impl DivAssign<f32> for Vec2
source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/=
operation. Read moresource§impl MulAssign<Vec2> for Keypoint
impl MulAssign<Vec2> for Keypoint
source§fn mul_assign(&mut self, rhs: Vec2)
fn mul_assign(&mut self, rhs: Vec2)
Performs the
*=
operation. Read moresource§impl MulAssign<Vec2> for Vec2
impl MulAssign<Vec2> for Vec2
source§fn mul_assign(&mut self, rhs: Vec2)
fn mul_assign(&mut self, rhs: Vec2)
Performs the
*=
operation. Read moresource§impl MulAssign<f32> for Vec2
impl MulAssign<f32> for Vec2
source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*=
operation. Read moresource§impl PartialEq<Vec2> for Vec2
impl PartialEq<Vec2> for Vec2
source§impl PartialOrd<Vec2> for Vec2
impl PartialOrd<Vec2> for Vec2
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl SubAssign<Vec2> for Keypoint
impl SubAssign<Vec2> for Keypoint
source§fn sub_assign(&mut self, rhs: Vec2)
fn sub_assign(&mut self, rhs: Vec2)
Performs the
-=
operation. Read moresource§impl SubAssign<Vec2> for Vec2
impl SubAssign<Vec2> for Vec2
source§fn sub_assign(&mut self, rhs: Vec2)
fn sub_assign(&mut self, rhs: Vec2)
Performs the
-=
operation. Read moresource§impl SubAssign<f32> for Vec2
impl SubAssign<f32> for Vec2
source§fn sub_assign(&mut self, rhs: f32)
fn sub_assign(&mut self, rhs: f32)
Performs the
-=
operation. Read more