pub struct Vec2<T: VecItem> {
pub x: T,
pub y: T,
}Fields§
§x: T§y: TImplementations§
Trait Implementations§
Source§impl<T> AddAssign<T> for Vec2<T>
impl<T> AddAssign<T> for Vec2<T>
Source§fn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
Performs the
+= operation. Read moreSource§impl<T> AddAssign for Vec2<T>
impl<T> AddAssign for Vec2<T>
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moreSource§impl<T> DivAssign<T> for Vec2<T>
impl<T> DivAssign<T> for Vec2<T>
Source§fn div_assign(&mut self, other: T)
fn div_assign(&mut self, other: T)
Performs the
/= operation. Read moreSource§impl<T> DivAssign for Vec2<T>
impl<T> DivAssign for Vec2<T>
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/= operation. Read moreSource§impl<T> MulAssign<T> for Vec2<T>
impl<T> MulAssign<T> for Vec2<T>
Source§fn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
Performs the
*= operation. Read moreSource§impl<T> MulAssign for Vec2<T>
impl<T> MulAssign for Vec2<T>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moreSource§impl<T> SubAssign<T> for Vec2<T>
impl<T> SubAssign<T> for Vec2<T>
Source§fn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
Performs the
-= operation. Read moreSource§impl<T> SubAssign for Vec2<T>
impl<T> SubAssign for Vec2<T>
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreSource§impl<T> VecFloat for Vec2<T>
impl<T> VecFloat for Vec2<T>
Source§impl<T> VecSigned for Vec2<T>
impl<T> VecSigned for Vec2<T>
Source§fn snake_length(&self) -> Self::Item
fn snake_length(&self) -> Self::Item
Calculates the snake length (also known as ‘manhattan distance’) of the vector Read more
impl<T: Copy + VecItem> Copy for Vec2<T>
impl<T: Eq + VecItem> Eq for Vec2<T>
impl<T: VecItem> StructuralPartialEq for Vec2<T>
Auto Trait Implementations§
impl<T> Freeze for Vec2<T>where
T: Freeze,
impl<T> RefUnwindSafe for Vec2<T>where
T: RefUnwindSafe,
impl<T> Send for Vec2<T>where
T: Send,
impl<T> Sync for Vec2<T>where
T: Sync,
impl<T> Unpin for Vec2<T>where
T: Unpin,
impl<T> UnwindSafe for Vec2<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