pub struct Vector2 {
pub x: f32,
pub y: f32,
/* private fields */
}
Fields§
§x: f32
§y: f32
Implementations§
Trait Implementations§
source§impl AddAssign<Vector2> for Vector2
impl AddAssign<Vector2> for Vector2
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl DivAssign<Vector2> for Vector2
impl DivAssign<Vector2> for Vector2
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresource§impl DivAssign<f32> for Vector2
impl DivAssign<f32> for Vector2
source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/=
operation. Read moresource§impl MulAssign<Vector2> for Vector2
impl MulAssign<Vector2> for Vector2
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl MulAssign<f32> for Vector2
impl MulAssign<f32> for Vector2
source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*=
operation. Read moresource§impl PartialEq<Vector2> for Vector2
impl PartialEq<Vector2> for Vector2
source§impl SubAssign<Vector2> for Vector2
impl SubAssign<Vector2> for Vector2
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moresource§impl Vector for Vector2
impl Vector for Vector2
fn zero() -> Self
fn one() -> Self
fn infinity() -> Self
fn nan() -> Self
fn epsilon() -> Self
fn replicate(value: f32) -> Self
fn is_nan(&self) -> bool
fn is_infinite(&self) -> bool
fn dot(&self, other: &Self) -> f32
fn swizzle(&self, e0: usize, e1: usize, _e2: usize, _e3: usize) -> Self
fn permute( &self, other: &Self, permute_x: usize, permute_y: usize, _permute_z: usize, _permute_w: usize ) -> Self
fn transform(&self, matrix: &Matrix) -> Self
fn min(&self, other: &Self) -> Self
fn max(&self, other: &Self) -> Self
fn round(&self) -> Self
fn trunc(&self) -> Self
fn floor(&self) -> Self
fn ceil(&self) -> Self
fn clamp(&self, min: &Self, max: &Self) -> Self
fn multiply_add(&self, mul: &Self, add: &Self) -> Self
fn splat_x(&self) -> Self
fn splat_y(&self) -> Self
fn splat_z(&self) -> Self
fn splat_w(&self) -> Self
fn is_finite(&self) -> bool
fn length_sq(&self) -> f32
fn length(&self) -> f32
fn normalize(self) -> Self
impl Copy for Vector2
impl StructuralPartialEq for Vector2
Auto Trait Implementations§
impl RefUnwindSafe for Vector2
impl Send for Vector2
impl Sync for Vector2
impl Unpin for Vector2
impl UnwindSafe for Vector2
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more