pub struct Vector2 {
pub x: f32,
pub y: f32,
}Expand description
A 2D direction with magnitude.
Fields§
§x: f32Horizontal
y: f32Vertical
Implementations§
Trait Implementations§
Source§impl AddAssign for Vector2
Available on non-crate feature raylib only.
impl AddAssign for Vector2
Available on non-crate feature
raylib only.Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl MulAssign<f32> for Vector2
Available on non-crate feature raylib only.
impl MulAssign<f32> for Vector2
Available on non-crate feature
raylib only.Source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*= operation. Read moreSource§impl MulAssign for Vector2
Available on non-crate feature raylib only.
impl MulAssign for Vector2
Available on non-crate feature
raylib only.Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl SubAssign for Vector2
Available on non-crate feature raylib only.
impl SubAssign for Vector2
Available on non-crate feature
raylib only.Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for Vector2
impl StructuralPartialEq for Vector2
Auto Trait Implementations§
impl Freeze for Vector2
impl RefUnwindSafe for Vector2
impl Send for Vector2
impl Sync for Vector2
impl Unpin for Vector2
impl UnsafeUnpin for Vector2
impl UnwindSafe for Vector2
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