pub struct Vec4x8 {
pub x: f32x8,
pub y: f32x8,
pub z: f32x8,
pub w: f32x8,
}Expand description
SoA. Performs operations on x Vecs.
Fields§
§x: f32x8§y: f32x8§z: f32x8§w: f32x8Implementations§
Source§impl Vec4x8
impl Vec4x8
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) -> f32x8
pub fn magnitude_squared(self) -> f32x8
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<f32x8> for Vec4x8
impl AddAssign<f32x8> for Vec4x8
Source§fn add_assign(&mut self, rhs: f32x8)
fn add_assign(&mut self, rhs: f32x8)
Performs the
+= operation. Read moreSource§impl AddAssign for Vec4x8
impl AddAssign for Vec4x8
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl DivAssign<f32x8> for Vec4x8
impl DivAssign<f32x8> for Vec4x8
Source§fn div_assign(&mut self, rhs: f32x8)
fn div_assign(&mut self, rhs: f32x8)
Performs the
/= operation. Read moreSource§impl MulAssign<f32x8> for Vec4x8
impl MulAssign<f32x8> for Vec4x8
Source§fn mul_assign(&mut self, rhs: f32x8)
fn mul_assign(&mut self, rhs: f32x8)
Performs the
*= operation. Read moreSource§impl SubAssign<f32x8> for Vec4x8
impl SubAssign<f32x8> for Vec4x8
Source§fn sub_assign(&mut self, rhs: f32x8)
fn sub_assign(&mut self, rhs: f32x8)
Performs the
-= operation. Read moreSource§impl SubAssign for Vec4x8
impl SubAssign for Vec4x8
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for Vec4x8
Auto Trait Implementations§
impl Freeze for Vec4x8
impl RefUnwindSafe for Vec4x8
impl Send for Vec4x8
impl Sync for Vec4x8
impl Unpin for Vec4x8
impl UnsafeUnpin for Vec4x8
impl UnwindSafe for Vec4x8
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