#[repr(C)]pub struct V4 {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}
Fields§
§x: f32
§y: f32
§z: f32
§w: f32
Implementations§
Source§impl V4
impl V4
pub const fn new(x: f32, y: f32, z: f32, w: f32) -> Self
pub fn length_squared(&self) -> scalar
pub fn length(&self) -> scalar
pub fn dot(&self, b: &Self) -> scalar
pub fn normalize(&self) -> Self
pub fn as_array(&self) -> &[f32; 4]
pub fn as_mut_array(&mut self) -> &mut [f32; 4]
Trait Implementations§
Source§impl AddAssign for V4
impl AddAssign for V4
Source§fn add_assign(&mut self, v: Self)
fn add_assign(&mut self, v: Self)
Performs the
+=
operation. Read moreSource§impl MulAssign<f32> for V4
impl MulAssign<f32> for V4
Source§fn mul_assign(&mut self, s: scalar)
fn mul_assign(&mut self, s: scalar)
Performs the
*=
operation. Read moreSource§impl MulAssign for V4
impl MulAssign for V4
Source§fn mul_assign(&mut self, v: Self)
fn mul_assign(&mut self, v: Self)
Performs the
*=
operation. Read moreSource§impl SubAssign for V4
impl SubAssign for V4
Source§fn sub_assign(&mut self, v: Self)
fn sub_assign(&mut self, v: Self)
Performs the
-=
operation. Read moreimpl Copy for V4
impl StructuralPartialEq for V4
Auto Trait Implementations§
impl Freeze for V4
impl RefUnwindSafe for V4
impl Send for V4
impl Sync for V4
impl Unpin for V4
impl UnwindSafe for V4
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