pub struct Vec2 {
pub x: f32,
pub y: f32,
}Expand description
2D vector This can be used to represent a point or free vector
Fields§
§x: f32§y: f32Implementations§
Trait Implementations§
Source§impl AddAssign for Vec2
impl AddAssign for Vec2
Source§fn add_assign(&mut self, b: Vec2)
fn add_assign(&mut self, b: Vec2)
Performs the
+= operation. Read moreimpl Copy for Vec2
Source§impl MulAssign<f32> for Vec2
impl MulAssign<f32> for Vec2
Source§fn mul_assign(&mut self, b: f32)
fn mul_assign(&mut self, b: f32)
Performs the
*= operation. Read moreimpl 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 UnsafeUnpin 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