pub struct Vector2D<T> {
pub x: T,
pub y: T,
}
Expand description
A 2-dimensional vector.
Fields§
§x: T
x axis
y: T
y axis
Trait Implementations§
Source§impl<T: AddAssign> AddAssign for Vector2D<T>
impl<T: AddAssign> AddAssign for Vector2D<T>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl<T: MulAssign> MulAssign for Vector2D<T>
impl<T: MulAssign> MulAssign for Vector2D<T>
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moreSource§impl<T: PartialOrd> PartialOrd for Vector2D<T>
impl<T: PartialOrd> PartialOrd for Vector2D<T>
impl<T: Copy> Copy for Vector2D<T>
impl<T> StructuralPartialEq for Vector2D<T>
Auto Trait Implementations§
impl<T> Freeze for Vector2D<T>where
T: Freeze,
impl<T> RefUnwindSafe for Vector2D<T>where
T: RefUnwindSafe,
impl<T> Send for Vector2D<T>where
T: Send,
impl<T> Sync for Vector2D<T>where
T: Sync,
impl<T> Unpin for Vector2D<T>where
T: Unpin,
impl<T> UnwindSafe for Vector2D<T>where
T: UnwindSafe,
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