pub struct Vector3 { /* private fields */ }Implementations§
source§impl Vector3
impl Vector3
pub fn new(x: f32, y: f32, z: f32) -> Vector3
pub fn get_vector(&self) -> [f32; 3]
pub fn get_vector_mut(&mut self) -> &mut [f32; 3]
pub fn x(&self) -> f32
pub fn y(&self) -> f32
pub fn z(&self) -> f32
pub fn length(&self) -> f32
pub fn dot(&self, v: &Vector3) -> f32
pub fn cross(&self, v: &Vector3) -> Vector3
pub fn normalize(&self) -> Vector3
Trait Implementations§
source§impl AddAssign for Vector3
impl AddAssign for Vector3
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moresource§impl DivAssign for Vector3
impl DivAssign for Vector3
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moresource§impl MulAssign for Vector3
impl MulAssign for Vector3
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moresource§impl SubAssign for Vector3
impl SubAssign for Vector3
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for Vector3
Auto Trait Implementations§
impl Freeze for Vector3
impl RefUnwindSafe for Vector3
impl Send for Vector3
impl Sync for Vector3
impl Unpin for Vector3
impl UnwindSafe for Vector3
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