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