pub struct Vec2 {
pub x: u16,
pub y: u16,
}
Expand description
A 2d Vector that has no math, is only used as a pretty version of a tuple of u16s Can be made from (u16, u16). Using a single u16.into() will create a vec2 where both values are the same.
Fields§
§x: u16
§y: u16
Trait Implementations§
Source§impl<V: Into<Vec2>> AddAssign<V> for Vec2
impl<V: Into<Vec2>> AddAssign<V> for Vec2
Source§fn add_assign(&mut self, rhs: V)
fn add_assign(&mut self, rhs: V)
Performs the
+=
operation. Read moreSource§impl Ord for Vec2
impl Ord for Vec2
Source§impl PartialOrd for Vec2
impl PartialOrd for Vec2
Source§impl<V: Into<Vec2>> SubAssign<V> for Vec2
impl<V: Into<Vec2>> SubAssign<V> for Vec2
Source§fn sub_assign(&mut self, rhs: V)
fn sub_assign(&mut self, rhs: V)
Performs the
-=
operation. Read moreimpl Copy for Vec2
impl Eq for Vec2
impl StructuralPartialEq for Vec2
Auto Trait Implementations§
impl Freeze for Vec2
impl RefUnwindSafe for Vec2
impl Send for Vec2
impl Sync for Vec2
impl Unpin for Vec2
impl UnwindSafe for Vec2
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