pub struct Vec4H {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}Fields§
§x: f32§y: f32§z: f32§w: f32Implementations§
Source§impl Vec4H
impl Vec4H
pub const ONE: Self
pub const ZERO: Self
pub fn new(x: f32, y: f32, z: f32, w: f32) -> Self
pub fn dot(&self, other: Self) -> f32
Sourcepub fn minkowski_dot(&self, other: Self) -> f32
pub fn minkowski_dot(&self, other: Self) -> f32
Minkowski inner product: -x₀y₀ + x₁y₁ + x₂y₂ + x₃y₃ (hyperboloid model)
pub fn length(&self) -> f32
pub fn normalize(&self) -> Self
pub fn lerp(&self, other: Self, t: f32) -> Self
pub fn xyz(&self) -> Vec3
Trait Implementations§
impl Copy for Vec4H
Source§impl<'de> Deserialize<'de> for Vec4H
impl<'de> Deserialize<'de> for Vec4H
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Vec4H
Auto Trait Implementations§
impl Freeze for Vec4H
impl RefUnwindSafe for Vec4H
impl Send for Vec4H
impl Sync for Vec4H
impl Unpin for Vec4H
impl UnsafeUnpin for Vec4H
impl UnwindSafe for Vec4H
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