pub struct Vector {
pub x: f64,
pub y: f64,
}
Expand description
A 2D vector over the reals.
Fields§
§x: f64
x component of this vector.
y: f64
y component of this vector.
Implementations§
Trait Implementations§
Source§impl AddAssign<&Vector> for Point
impl AddAssign<&Vector> for Point
Source§fn add_assign(&mut self, other: &Vector)
fn add_assign(&mut self, other: &Vector)
Performs the
+=
operation. Read moreSource§impl AddAssign<&Vector> for Vector
impl AddAssign<&Vector> for Vector
Source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+=
operation. Read moreSource§impl AddAssign<Vector> for Point
impl AddAssign<Vector> for Point
Source§fn add_assign(&mut self, other: Vector)
fn add_assign(&mut self, other: Vector)
Performs the
+=
operation. Read moreSource§impl AddAssign for Vector
impl AddAssign for Vector
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moreSource§impl DivAssign<f64> for Vector
impl DivAssign<f64> for Vector
Source§fn div_assign(&mut self, scalar: f64)
fn div_assign(&mut self, scalar: f64)
Performs the
/=
operation. Read moreSource§impl MulAssign<f64> for Vector
impl MulAssign<f64> for Vector
Source§fn mul_assign(&mut self, scalar: f64)
fn mul_assign(&mut self, scalar: f64)
Performs the
*=
operation. Read moreSource§impl SubAssign<&Vector> for Vector
impl SubAssign<&Vector> for Vector
Source§fn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the
-=
operation. Read moreSource§impl SubAssign for Vector
impl SubAssign for Vector
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl Copy for Vector
Auto Trait Implementations§
impl Freeze for Vector
impl RefUnwindSafe for Vector
impl Send for Vector
impl Sync for Vector
impl Unpin for Vector
impl UnwindSafe for Vector
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