pub struct Vec3 {
pub x: f32,
pub y: f32,
pub z: f32,
}Fields§
§x: f32§y: f32§z: f32Implementations§
Trait Implementations§
Source§impl Vec for Vec3
impl Vec for Vec3
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 Vec3
Auto Trait Implementations§
impl Freeze for Vec3
impl RefUnwindSafe for Vec3
impl Send for Vec3
impl Sync for Vec3
impl Unpin for Vec3
impl UnwindSafe for Vec3
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