pub struct Vec2 { /* private fields */ }Implementations§
Source§impl Vec2
impl Vec2
pub fn new(x: f32, y: f32) -> Self
pub fn zero(&mut self)
pub fn copy(&mut self, input: &Vec2)
pub fn add(&mut self, input: &Vec2)
pub fn sub(&mut self, input: &Vec2)
pub fn mul(&mut self, input: &Vec2)
pub fn div(&mut self, input: &Vec2)
pub fn addf(&mut self, input: f32)
pub fn subf(&mut self, input: f32)
pub fn mulf(&mut self, input: f32)
pub fn divf(&mut self, input: f32)
pub fn neg(&mut self)
pub fn dot(&mut self, input: &Vec2) -> f32
pub fn len(&mut self) -> f32
pub fn set(&mut self, x: f32, y: f32)
pub fn min(&mut self, input: &Vec2)
pub fn max(&mut self, input: &Vec2)
pub fn minf(&mut self, input: f32)
pub fn maxf(&mut self, input: f32)
pub fn abs(&mut self)
pub fn ceil(&mut self)
pub fn floor(&mut self)
pub fn close(&mut self, input: &Vec2, epsilon: f32) -> bool
pub fn x(&self) -> f32
pub fn y(&self) -> f32
pub fn as_ptr(&mut self) -> *mut vec2
Trait Implementations§
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