pub struct Vec4x16 {
pub x: f32x16,
pub y: f32x16,
pub z: f32x16,
pub w: f32x16,
}Expand description
SoA. Performs operations on x Vecs.
Fields§
§x: f32x16§y: f32x16§z: f32x16§w: f32x16Implementations§
Source§impl Vec4x16
impl Vec4x16
Sourcepub fn hadamard_product(self, rhs: Self) -> Self
pub fn hadamard_product(self, rhs: Self) -> Self
Calculates the Hadamard product (element-wise multiplication).
Sourcepub fn magnitude_squared(self) -> f32x16
pub fn magnitude_squared(self) -> f32x16
Returns the vector magnitude squared
Sourcepub fn to_normalized(self) -> Self
pub fn to_normalized(self) -> Self
Returns the normalized version of the vector.
Sourcepub fn project_to_plane(self, plane_norm: Self) -> Self
pub fn project_to_plane(self, plane_norm: Self) -> Self
Project a vector onto a plane defined by its normal vector. Assumes self and plane_norm
are unit vectors.
Sourcepub fn project_to_vec(self, other: Self) -> Self
pub fn project_to_vec(self, other: Self) -> Self
Projects this vector onto another vector.
Trait Implementations§
Source§impl AddAssign<f32x16> for Vec4x16
impl AddAssign<f32x16> for Vec4x16
Source§fn add_assign(&mut self, rhs: f32x16)
fn add_assign(&mut self, rhs: f32x16)
Performs the
+= operation. Read moreSource§impl AddAssign for Vec4x16
impl AddAssign for Vec4x16
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl DivAssign<f32x16> for Vec4x16
impl DivAssign<f32x16> for Vec4x16
Source§fn div_assign(&mut self, rhs: f32x16)
fn div_assign(&mut self, rhs: f32x16)
Performs the
/= operation. Read moreSource§impl MulAssign<f32x16> for Vec4x16
impl MulAssign<f32x16> for Vec4x16
Source§fn mul_assign(&mut self, rhs: f32x16)
fn mul_assign(&mut self, rhs: f32x16)
Performs the
*= operation. Read moreSource§impl SubAssign<f32x16> for Vec4x16
impl SubAssign<f32x16> for Vec4x16
Source§fn sub_assign(&mut self, rhs: f32x16)
fn sub_assign(&mut self, rhs: f32x16)
Performs the
-= operation. Read moreSource§impl SubAssign for Vec4x16
impl SubAssign for Vec4x16
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for Vec4x16
Auto Trait Implementations§
impl Freeze for Vec4x16
impl RefUnwindSafe for Vec4x16
impl Send for Vec4x16
impl Sync for Vec4x16
impl Unpin for Vec4x16
impl UnsafeUnpin for Vec4x16
impl UnwindSafe for Vec4x16
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