#[repr(C)]pub struct Vector2 {
pub x: Scalar,
pub y: Scalar,
}Expand description
A 2-dimensional vector
Fields§
§x: Scalar§y: ScalarImplementations§
Trait Implementations§
Source§impl AbsDiffEq for Vector2
impl AbsDiffEq for Vector2
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§impl AddAssign for Vector2
impl AddAssign for Vector2
Source§fn add_assign(&mut self, rhs: Self)
fn add_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: Scalar)
fn div_assign(&mut self, rhs: Scalar)
Performs the
/= operation. Read moreSource§impl MulAssign<f32> for Vector2
impl MulAssign<f32> for Vector2
Source§fn mul_assign(&mut self, rhs: Scalar)
fn mul_assign(&mut self, rhs: Scalar)
Performs the
*= operation. Read moreSource§impl RelativeEq for Vector2
impl RelativeEq for Vector2
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§impl SubAssign for Vector2
impl SubAssign for Vector2
Source§fn sub_assign(&mut self, rhs: Vector2)
fn sub_assign(&mut self, rhs: Vector2)
Performs the
-= operation. Read moreSource§impl UlpsEq for Vector2
impl UlpsEq for Vector2
impl Copy for Vector2
impl StructuralPartialEq for Vector2
Auto Trait Implementations§
impl Freeze for Vector2
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