pub struct Vec2 {
pub x: f32,
pub y: f32,
}Fields§
§x: f32§y: f32Implementations§
Trait Implementations§
Source§impl Vec for Vec2
impl Vec for Vec2
fn get_component_count(&self) -> usize
fn get_component(&self, index: usize) -> f32
fn set_component(&mut self, index: usize, value: f32)
fn abs(&mut self) -> &mut Self
fn add(&mut self, other: &impl Vec) -> &mut Self
fn sub(&mut self, other: &impl Vec) -> &mut Self
fn mul(&mut self, other: &impl Vec) -> &mut Self
fn div(&mut self, other: &impl Vec) -> &mut Self
fn modulo(&mut self, other: &impl Vec) -> &mut Self
fn min(&mut self, other: &impl Vec) -> &mut Self
fn max(&mut self, other: &impl Vec) -> &mut Self
fn len(&self) -> f32
fn neg(&mut self) -> &mut Self
fn scale(&mut self, f: f32) -> &mut Self
fn normal(&mut self) -> &mut Self
fn dist(&self, other: &impl Vec) -> f32
fn dot(&self, other: &impl Vec) -> f32
fn angle(&self, other: &impl Vec) -> f32
impl Copy 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