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