pub struct Vec4(/* private fields */);
Expand description
A 4-dimensional vector.
SIMD vector types are used for storage on supported platforms.
This type is 16 byte aligned.
Implementations§
Source§impl Vec4
impl Vec4
Sourcepub const NEG_INFINITY: Self
pub const NEG_INFINITY: Self
All f32::NEG_INFINITY
.
Sourcepub const USES_CORE_SIMD: bool = false
pub const USES_CORE_SIMD: bool = false
Vec4 uses Rust Portable SIMD
Sourcepub const USES_SCALAR_MATH: bool = false
pub const USES_SCALAR_MATH: bool = false
Vec4 uses scalar math
Sourcepub const USES_WASM32_SIMD: bool = false
pub const USES_WASM32_SIMD: bool = false
Vec4 uses WebAssembly 128-bit SIMD
Sourcepub fn map<F>(self, f: F) -> Self
pub fn map<F>(self, f: F) -> Self
Returns a vector containing each element of self
modified by a mapping function f
.
Sourcepub fn select(mask: BVec4A, if_true: Self, if_false: Self) -> Self
pub fn select(mask: BVec4A, if_true: Self, if_false: Self) -> Self
Creates a vector from the elements in if_true
and if_false
, selecting which to use
for each element of self
.
A true element in the mask uses the corresponding element from if_true
, and false
uses the element from if_false
.
Sourcepub const fn from_array(a: [f32; 4]) -> Self
pub const fn from_array(a: [f32; 4]) -> Self
Creates a new vector from an array.
Sourcepub const fn from_slice(slice: &[f32]) -> Self
pub const fn from_slice(slice: &[f32]) -> Self
Creates a vector from the first 4 values in slice
.
§Panics
Panics if slice
is less than 4 elements long.
Sourcepub fn write_to_slice(self, slice: &mut [f32])
pub fn write_to_slice(self, slice: &mut [f32])
Writes the elements of self
to the first 4 elements in slice
.
§Panics
Panics if slice
is less than 4 elements long.
Sourcepub fn truncate(self) -> Vec3
pub fn truncate(self) -> Vec3
Creates a 3D vector from the x
, y
and z
elements of self
, discarding w
.
Truncation to Vec3
may also be performed by using self.xyz()
.
To truncate to Vec3A
use Vec3A::from_vec4()
.
Sourcepub fn dot_into_vec(self, rhs: Self) -> Self
pub fn dot_into_vec(self, rhs: Self) -> Self
Returns a vector where every component is the dot product of self
and rhs
.
Sourcepub fn min(self, rhs: Self) -> Self
pub fn min(self, rhs: Self) -> Self
Returns a vector containing the minimum values for each element of self
and rhs
.
In other words this computes [min(x, rhs.x), min(self.y, rhs.y), ..]
.
NaN propogation does not follow IEEE 754-2008 semantics for minNum and may differ on different SIMD architectures.
Sourcepub fn max(self, rhs: Self) -> Self
pub fn max(self, rhs: Self) -> Self
Returns a vector containing the maximum values for each element of self
and rhs
.
In other words this computes [max(self.x, rhs.x), max(self.y, rhs.y), ..]
.
NaN propogation does not follow IEEE 754-2008 semantics for maxNum and may differ on different SIMD architectures.
Sourcepub fn clamp(self, min: Self, max: Self) -> Self
pub fn clamp(self, min: Self, max: Self) -> Self
Component-wise clamping of values, similar to f32::clamp
.
Each element in min
must be less-or-equal to the corresponding element in max
.
NaN propogation does not follow IEEE 754-2008 semantics and may differ on different SIMD architectures.
§Panics
Will panic if min
is greater than max
when glam_assert
is enabled.
Sourcepub fn min_element(self) -> f32
pub fn min_element(self) -> f32
Returns the horizontal minimum of self
.
In other words this computes min(x, y, ..)
.
NaN propogation does not follow IEEE 754-2008 semantics and may differ on different SIMD architectures.
Sourcepub fn max_element(self) -> f32
pub fn max_element(self) -> f32
Returns the horizontal maximum of self
.
In other words this computes max(x, y, ..)
.
NaN propogation does not follow IEEE 754-2008 semantics and may differ on different SIMD architectures.
Sourcepub fn min_position(self) -> usize
pub fn min_position(self) -> usize
Returns the index of the first minimum element of self
.
Sourcepub fn max_position(self) -> usize
pub fn max_position(self) -> usize
Returns the index of the first maximum element of self
.
Sourcepub fn element_sum(self) -> f32
pub fn element_sum(self) -> f32
Returns the sum of all elements of self
.
In other words, this computes self.x + self.y + ..
.
Sourcepub fn element_product(self) -> f32
pub fn element_product(self) -> f32
Returns the product of all elements of self
.
In other words, this computes self.x * self.y * ..
.
Sourcepub fn cmpeq(self, rhs: Self) -> BVec4A
pub fn cmpeq(self, rhs: Self) -> BVec4A
Returns a vector mask containing the result of a ==
comparison for each element of
self
and rhs
.
In other words, this computes [self.x == rhs.x, self.y == rhs.y, ..]
for all
elements.
Sourcepub fn cmpne(self, rhs: Self) -> BVec4A
pub fn cmpne(self, rhs: Self) -> BVec4A
Returns a vector mask containing the result of a !=
comparison for each element of
self
and rhs
.
In other words this computes [self.x != rhs.x, self.y != rhs.y, ..]
for all
elements.
Sourcepub fn cmpge(self, rhs: Self) -> BVec4A
pub fn cmpge(self, rhs: Self) -> BVec4A
Returns a vector mask containing the result of a >=
comparison for each element of
self
and rhs
.
In other words this computes [self.x >= rhs.x, self.y >= rhs.y, ..]
for all
elements.
Sourcepub fn cmpgt(self, rhs: Self) -> BVec4A
pub fn cmpgt(self, rhs: Self) -> BVec4A
Returns a vector mask containing the result of a >
comparison for each element of
self
and rhs
.
In other words this computes [self.x > rhs.x, self.y > rhs.y, ..]
for all
elements.
Sourcepub fn cmple(self, rhs: Self) -> BVec4A
pub fn cmple(self, rhs: Self) -> BVec4A
Returns a vector mask containing the result of a <=
comparison for each element of
self
and rhs
.
In other words this computes [self.x <= rhs.x, self.y <= rhs.y, ..]
for all
elements.
Sourcepub fn cmplt(self, rhs: Self) -> BVec4A
pub fn cmplt(self, rhs: Self) -> BVec4A
Returns a vector mask containing the result of a <
comparison for each element of
self
and rhs
.
In other words this computes [self.x < rhs.x, self.y < rhs.y, ..]
for all
elements.
Sourcepub fn abs(self) -> Self
pub fn abs(self) -> Self
Returns a vector containing the absolute value of each element of self
.
Sourcepub fn signum(self) -> Self
pub fn signum(self) -> Self
Returns a vector with elements representing the sign of self
.
1.0
if the number is positive,+0.0
orINFINITY
-1.0
if the number is negative,-0.0
orNEG_INFINITY
NAN
if the number isNAN
Sourcepub fn copysign(self, rhs: Self) -> Self
pub fn copysign(self, rhs: Self) -> Self
Returns a vector with signs of rhs
and the magnitudes of self
.
Sourcepub fn is_negative_bitmask(self) -> u32
pub fn is_negative_bitmask(self) -> u32
Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of self
.
A negative element results in a 1
bit and a positive element in a 0
bit. Element x
goes
into the first lowest bit, element y
into the second, etc.
An element is negative if it has a negative sign, including -0.0, NaNs with negative sign bit and negative infinity.
Sourcepub fn is_finite(self) -> bool
pub fn is_finite(self) -> bool
Returns true
if, and only if, all elements are finite. If any element is either
NaN
, positive or negative infinity, this will return false
.
Sourcepub fn is_finite_mask(self) -> BVec4A
pub fn is_finite_mask(self) -> BVec4A
Performs is_finite
on each element of self, returning a vector mask of the results.
In other words, this computes [x.is_finite(), y.is_finite(), ...]
.
Sourcepub fn is_nan_mask(self) -> BVec4A
pub fn is_nan_mask(self) -> BVec4A
Performs is_nan
on each element of self, returning a vector mask of the results.
In other words, this computes [x.is_nan(), y.is_nan(), ...]
.
Sourcepub fn length_squared(self) -> f32
pub fn length_squared(self) -> f32
Computes the squared length of self
.
This is faster than length()
as it avoids a square root operation.
Sourcepub fn length_recip(self) -> f32
pub fn length_recip(self) -> f32
Computes 1.0 / length()
.
For valid results, self
must not be of length zero.
Sourcepub fn distance(self, rhs: Self) -> f32
pub fn distance(self, rhs: Self) -> f32
Computes the Euclidean distance between two points in space.
Sourcepub fn distance_squared(self, rhs: Self) -> f32
pub fn distance_squared(self, rhs: Self) -> f32
Compute the squared euclidean distance between two points in space.
Sourcepub fn div_euclid(self, rhs: Self) -> Self
pub fn div_euclid(self, rhs: Self) -> Self
Returns the element-wise quotient of [Euclidean division] of self
by rhs
.
Sourcepub fn rem_euclid(self, rhs: Self) -> Self
pub fn rem_euclid(self, rhs: Self) -> Self
Returns the element-wise remainder of Euclidean division of self
by rhs
.
Sourcepub fn normalize(self) -> Self
pub fn normalize(self) -> Self
Returns self
normalized to length 1.0.
For valid results, self
must be finite and not of length zero, nor very close to zero.
See also Self::try_normalize()
and Self::normalize_or_zero()
.
§Panics
Will panic if the resulting normalized vector is not finite when glam_assert
is enabled.
Sourcepub fn try_normalize(self) -> Option<Self>
pub fn try_normalize(self) -> Option<Self>
Returns self
normalized to length 1.0 if possible, else returns None
.
In particular, if the input is zero (or very close to zero), or non-finite,
the result of this operation will be None
.
See also Self::normalize_or_zero()
.
Sourcepub fn normalize_or(self, fallback: Self) -> Self
pub fn normalize_or(self, fallback: Self) -> Self
Returns self
normalized to length 1.0 if possible, else returns a
fallback value.
In particular, if the input is zero (or very close to zero), or non-finite, the result of this operation will be the fallback value.
See also Self::try_normalize()
.
Sourcepub fn normalize_or_zero(self) -> Self
pub fn normalize_or_zero(self) -> Self
Returns self
normalized to length 1.0 if possible, else returns zero.
In particular, if the input is zero (or very close to zero), or non-finite, the result of this operation will be zero.
See also Self::try_normalize()
.
Sourcepub fn normalize_and_length(self) -> (Self, f32)
pub fn normalize_and_length(self) -> (Self, f32)
Returns self
normalized to length 1.0 and the length of self
.
If self
is zero length then (Self::X, 0.0)
is returned.
Sourcepub fn is_normalized(self) -> bool
pub fn is_normalized(self) -> bool
Returns whether self
is length 1.0
or not.
Uses a precision threshold of approximately 1e-4
.
Sourcepub fn project_onto(self, rhs: Self) -> Self
pub fn project_onto(self, rhs: Self) -> Self
Returns the vector projection of self
onto rhs
.
rhs
must be of non-zero length.
§Panics
Will panic if rhs
is zero length when glam_assert
is enabled.
Sourcepub fn reject_from(self, rhs: Self) -> Self
pub fn reject_from(self, rhs: Self) -> Self
Returns the vector rejection of self
from rhs
.
The vector rejection is the vector perpendicular to the projection of self
onto
rhs
, in rhs words the result of self - self.project_onto(rhs)
.
rhs
must be of non-zero length.
§Panics
Will panic if rhs
has a length of zero when glam_assert
is enabled.
Sourcepub fn project_onto_normalized(self, rhs: Self) -> Self
pub fn project_onto_normalized(self, rhs: Self) -> Self
Returns the vector projection of self
onto rhs
.
rhs
must be normalized.
§Panics
Will panic if rhs
is not normalized when glam_assert
is enabled.
Sourcepub fn reject_from_normalized(self, rhs: Self) -> Self
pub fn reject_from_normalized(self, rhs: Self) -> Self
Returns the vector rejection of self
from rhs
.
The vector rejection is the vector perpendicular to the projection of self
onto
rhs
, in rhs words the result of self - self.project_onto(rhs)
.
rhs
must be normalized.
§Panics
Will panic if rhs
is not normalized when glam_assert
is enabled.
Sourcepub fn round(self) -> Self
pub fn round(self) -> Self
Returns a vector containing the nearest integer to a number for each element of self
.
Round half-way cases away from 0.0.
Sourcepub fn floor(self) -> Self
pub fn floor(self) -> Self
Returns a vector containing the largest integer less than or equal to a number for each
element of self
.
Sourcepub fn ceil(self) -> Self
pub fn ceil(self) -> Self
Returns a vector containing the smallest integer greater than or equal to a number for
each element of self
.
Sourcepub fn trunc(self) -> Self
pub fn trunc(self) -> Self
Returns a vector containing the integer part each element of self
. This means numbers are
always truncated towards zero.
Sourcepub fn fract(self) -> Self
pub fn fract(self) -> Self
Returns a vector containing the fractional part of the vector as self - self.trunc()
.
Note that this differs from the GLSL implementation of fract
which returns
self - self.floor()
.
Note that this is fast but not precise for large numbers.
Sourcepub fn fract_gl(self) -> Self
pub fn fract_gl(self) -> Self
Returns a vector containing the fractional part of the vector as self - self.floor()
.
Note that this differs from the Rust implementation of fract
which returns
self - self.trunc()
.
Note that this is fast but not precise for large numbers.
Sourcepub fn exp(self) -> Self
pub fn exp(self) -> Self
Returns a vector containing e^self
(the exponential function) for each element of
self
.
Sourcepub fn powf(self, n: f32) -> Self
pub fn powf(self, n: f32) -> Self
Returns a vector containing each element of self
raised to the power of n
.
Sourcepub fn recip(self) -> Self
pub fn recip(self) -> Self
Returns a vector containing the reciprocal 1.0/n
of each element of self
.
Sourcepub fn lerp(self, rhs: Self, s: f32) -> Self
pub fn lerp(self, rhs: Self, s: f32) -> Self
Performs a linear interpolation between self
and rhs
based on the value s
.
When s
is 0.0
, the result will be equal to self
. When s
is 1.0
, the result
will be equal to rhs
. When s
is outside of range [0, 1]
, the result is linearly
extrapolated.
Sourcepub fn move_towards(&self, rhs: Self, d: f32) -> Self
pub fn move_towards(&self, rhs: Self, d: f32) -> Self
Moves towards rhs
based on the value d
.
When d
is 0.0
, the result will be equal to self
. When d
is equal to
self.distance(rhs)
, the result will be equal to rhs
. Will not go past rhs
.
Sourcepub fn midpoint(self, rhs: Self) -> Self
pub fn midpoint(self, rhs: Self) -> Self
Calculates the midpoint between self
and rhs
.
The midpoint is the average of, or halfway point between, two vectors.
a.midpoint(b)
should yield the same result as a.lerp(b, 0.5)
while being slightly cheaper to compute.
Sourcepub fn abs_diff_eq(self, rhs: Self, max_abs_diff: f32) -> bool
pub fn abs_diff_eq(self, rhs: Self, max_abs_diff: f32) -> bool
Returns true if the absolute difference of all elements between self
and rhs
is
less than or equal to max_abs_diff
.
This can be used to compare if two vectors contain similar elements. It works best when
comparing with a known value. The max_abs_diff
that should be used used depends on
the values being compared against.
For more see comparing floating point numbers.
Sourcepub fn clamp_length(self, min: f32, max: f32) -> Self
pub fn clamp_length(self, min: f32, max: f32) -> Self
Returns a vector with a length no less than min
and no more than max
.
§Panics
Will panic if min
is greater than max
, or if either min
or max
is negative, when glam_assert
is enabled.
Sourcepub fn clamp_length_max(self, max: f32) -> Self
pub fn clamp_length_max(self, max: f32) -> Self
Returns a vector with a length no more than max
.
§Panics
Will panic if max
is negative when glam_assert
is enabled.
Sourcepub fn clamp_length_min(self, min: f32) -> Self
pub fn clamp_length_min(self, min: f32) -> Self
Returns a vector with a length no less than min
.
§Panics
Will panic if min
is negative when glam_assert
is enabled.
Sourcepub fn mul_add(self, a: Self, b: Self) -> Self
pub fn mul_add(self, a: Self, b: Self) -> Self
Fused multiply-add. Computes (self * a) + b
element-wise with only one rounding
error, yielding a more accurate result than an unfused multiply-add.
Using mul_add
may be more performant than an unfused multiply-add if the target
architecture has a dedicated fma CPU instruction. However, this is not always true,
and will be heavily dependant on designing algorithms with specific target hardware in
mind.
Sourcepub fn reflect(self, normal: Self) -> Self
pub fn reflect(self, normal: Self) -> Self
Returns the reflection vector for a given incident vector self
and surface normal
normal
.
normal
must be normalized.
§Panics
Will panic if normal
is not normalized when glam_assert
is enabled.
Sourcepub fn refract(self, normal: Self, eta: f32) -> Self
pub fn refract(self, normal: Self, eta: f32) -> Self
Returns the refraction direction for a given incident vector self
, surface normal
normal
and ratio of indices of refraction, eta
. When total internal reflection occurs,
a zero vector will be returned.
self
and normal
must be normalized.
§Panics
Will panic if self
or normal
is not normalized when glam_assert
is enabled.
Sourcepub fn as_i16vec4(&self) -> I16Vec4
pub fn as_i16vec4(&self) -> I16Vec4
Casts all elements of self
to i16
.
Sourcepub fn as_u16vec4(&self) -> U16Vec4
pub fn as_u16vec4(&self) -> U16Vec4
Casts all elements of self
to u16
.
Sourcepub fn as_i64vec4(&self) -> I64Vec4
pub fn as_i64vec4(&self) -> I64Vec4
Casts all elements of self
to i64
.
Sourcepub fn as_u64vec4(&self) -> U64Vec4
pub fn as_u64vec4(&self) -> U64Vec4
Casts all elements of self
to u64
.
Sourcepub fn as_usizevec4(&self) -> USizeVec4
pub fn as_usizevec4(&self) -> USizeVec4
Casts all elements of self
to usize
.
Trait Implementations§
Source§impl AddAssign<&Vec4> for Vec4
impl AddAssign<&Vec4> for Vec4
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
+=
operation. Read moreSource§impl AddAssign<&f32> for Vec4
impl AddAssign<&f32> for Vec4
Source§fn add_assign(&mut self, rhs: &f32)
fn add_assign(&mut self, rhs: &f32)
+=
operation. Read moreSource§impl AddAssign<f32> for Vec4
impl AddAssign<f32> for Vec4
Source§fn add_assign(&mut self, rhs: f32)
fn add_assign(&mut self, rhs: f32)
+=
operation. Read moreSource§impl AddAssign for Vec4
impl AddAssign for Vec4
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+=
operation. Read moreSource§impl DivAssign<&Vec4> for Vec4
impl DivAssign<&Vec4> for Vec4
Source§fn div_assign(&mut self, rhs: &Self)
fn div_assign(&mut self, rhs: &Self)
/=
operation. Read moreSource§impl DivAssign<&f32> for Vec4
impl DivAssign<&f32> for Vec4
Source§fn div_assign(&mut self, rhs: &f32)
fn div_assign(&mut self, rhs: &f32)
/=
operation. Read moreSource§impl DivAssign<f32> for Vec4
impl DivAssign<f32> for Vec4
Source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
/=
operation. Read moreSource§impl DivAssign for Vec4
impl DivAssign for Vec4
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
/=
operation. Read moreSource§impl From<Vec4> for float32x4_t
impl From<Vec4> for float32x4_t
Source§impl From<float32x4_t> for Vec4
impl From<float32x4_t> for Vec4
Source§fn from(t: float32x4_t) -> Self
fn from(t: float32x4_t) -> Self
Source§impl MulAssign<&Vec4> for Vec4
impl MulAssign<&Vec4> for Vec4
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
*=
operation. Read moreSource§impl MulAssign<&f32> for Vec4
impl MulAssign<&f32> for Vec4
Source§fn mul_assign(&mut self, rhs: &f32)
fn mul_assign(&mut self, rhs: &f32)
*=
operation. Read moreSource§impl MulAssign<f32> for Vec4
impl MulAssign<f32> for Vec4
Source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
*=
operation. Read moreSource§impl MulAssign for Vec4
impl MulAssign for Vec4
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*=
operation. Read moreSource§impl RemAssign<&Vec4> for Vec4
impl RemAssign<&Vec4> for Vec4
Source§fn rem_assign(&mut self, rhs: &Self)
fn rem_assign(&mut self, rhs: &Self)
%=
operation. Read moreSource§impl RemAssign<&f32> for Vec4
impl RemAssign<&f32> for Vec4
Source§fn rem_assign(&mut self, rhs: &f32)
fn rem_assign(&mut self, rhs: &f32)
%=
operation. Read moreSource§impl RemAssign<f32> for Vec4
impl RemAssign<f32> for Vec4
Source§fn rem_assign(&mut self, rhs: f32)
fn rem_assign(&mut self, rhs: f32)
%=
operation. Read moreSource§impl RemAssign for Vec4
impl RemAssign for Vec4
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
%=
operation. Read moreSource§impl SubAssign<&Vec4> for Vec4
impl SubAssign<&Vec4> for Vec4
Source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
-=
operation. Read moreSource§impl SubAssign<&f32> for Vec4
impl SubAssign<&f32> for Vec4
Source§fn sub_assign(&mut self, rhs: &f32)
fn sub_assign(&mut self, rhs: &f32)
-=
operation. Read moreSource§impl SubAssign<f32> for Vec4
impl SubAssign<f32> for Vec4
Source§fn sub_assign(&mut self, rhs: f32)
fn sub_assign(&mut self, rhs: f32)
-=
operation. Read moreSource§impl SubAssign for Vec4
impl SubAssign for Vec4
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-=
operation. Read moreSource§impl Vec4Swizzles for Vec4
impl Vec4Swizzles for Vec4
type Vec2 = Vec2
type Vec3 = Vec3
fn xx(self) -> Vec2
fn xy(self) -> Vec2
fn with_xy(self, rhs: Vec2) -> Self
fn xz(self) -> Vec2
fn with_xz(self, rhs: Vec2) -> Self
fn xw(self) -> Vec2
fn with_xw(self, rhs: Vec2) -> Self
fn yx(self) -> Vec2
fn with_yx(self, rhs: Vec2) -> Self
fn yy(self) -> Vec2
fn yz(self) -> Vec2
fn with_yz(self, rhs: Vec2) -> Self
fn yw(self) -> Vec2
fn with_yw(self, rhs: Vec2) -> Self
fn zx(self) -> Vec2
fn with_zx(self, rhs: Vec2) -> Self
fn zy(self) -> Vec2
fn with_zy(self, rhs: Vec2) -> Self
fn zz(self) -> Vec2
fn zw(self) -> Vec2
fn with_zw(self, rhs: Vec2) -> Self
fn wx(self) -> Vec2
fn with_wx(self, rhs: Vec2) -> Self
fn wy(self) -> Vec2
fn with_wy(self, rhs: Vec2) -> Self
fn wz(self) -> Vec2
fn with_wz(self, rhs: Vec2) -> Self
fn ww(self) -> Vec2
fn xxx(self) -> Vec3
fn xxy(self) -> Vec3
fn xxz(self) -> Vec3
fn xxw(self) -> Vec3
fn xyx(self) -> Vec3
fn xyy(self) -> Vec3
fn xyz(self) -> Vec3
fn with_xyz(self, rhs: Vec3) -> Self
fn xyw(self) -> Vec3
fn with_xyw(self, rhs: Vec3) -> Self
fn xzx(self) -> Vec3
fn xzy(self) -> Vec3
fn with_xzy(self, rhs: Vec3) -> Self
fn xzz(self) -> Vec3
fn xzw(self) -> Vec3
fn with_xzw(self, rhs: Vec3) -> Self
fn xwx(self) -> Vec3
fn xwy(self) -> Vec3
fn with_xwy(self, rhs: Vec3) -> Self
fn xwz(self) -> Vec3
fn with_xwz(self, rhs: Vec3) -> Self
fn xww(self) -> Vec3
fn yxx(self) -> Vec3
fn yxy(self) -> Vec3
fn yxz(self) -> Vec3
fn with_yxz(self, rhs: Vec3) -> Self
fn yxw(self) -> Vec3
fn with_yxw(self, rhs: Vec3) -> Self
fn yyx(self) -> Vec3
fn yyy(self) -> Vec3
fn yyz(self) -> Vec3
fn yyw(self) -> Vec3
fn yzx(self) -> Vec3
fn with_yzx(self, rhs: Vec3) -> Self
fn yzy(self) -> Vec3
fn yzz(self) -> Vec3
fn yzw(self) -> Vec3
fn with_yzw(self, rhs: Vec3) -> Self
fn ywx(self) -> Vec3
fn with_ywx(self, rhs: Vec3) -> Self
fn ywy(self) -> Vec3
fn ywz(self) -> Vec3
fn with_ywz(self, rhs: Vec3) -> Self
fn yww(self) -> Vec3
fn zxx(self) -> Vec3
fn zxy(self) -> Vec3
fn with_zxy(self, rhs: Vec3) -> Self
fn zxz(self) -> Vec3
fn zxw(self) -> Vec3
fn with_zxw(self, rhs: Vec3) -> Self
fn zyx(self) -> Vec3
fn with_zyx(self, rhs: Vec3) -> Self
fn zyy(self) -> Vec3
fn zyz(self) -> Vec3
fn zyw(self) -> Vec3
fn with_zyw(self, rhs: Vec3) -> Self
fn zzx(self) -> Vec3
fn zzy(self) -> Vec3
fn zzz(self) -> Vec3
fn zzw(self) -> Vec3
fn zwx(self) -> Vec3
fn with_zwx(self, rhs: Vec3) -> Self
fn zwy(self) -> Vec3
fn with_zwy(self, rhs: Vec3) -> Self
fn zwz(self) -> Vec3
fn zww(self) -> Vec3
fn wxx(self) -> Vec3
fn wxy(self) -> Vec3
fn with_wxy(self, rhs: Vec3) -> Self
fn wxz(self) -> Vec3
fn with_wxz(self, rhs: Vec3) -> Self
fn wxw(self) -> Vec3
fn wyx(self) -> Vec3
fn with_wyx(self, rhs: Vec3) -> Self
fn wyy(self) -> Vec3
fn wyz(self) -> Vec3
fn with_wyz(self, rhs: Vec3) -> Self
fn wyw(self) -> Vec3
fn wzx(self) -> Vec3
fn with_wzx(self, rhs: Vec3) -> Self
fn wzy(self) -> Vec3
fn with_wzy(self, rhs: Vec3) -> Self
fn wzz(self) -> Vec3
fn wzw(self) -> Vec3
fn wwx(self) -> Vec3
fn wwy(self) -> Vec3
fn wwz(self) -> Vec3
fn www(self) -> Vec3
fn xxxx(self) -> Self
fn xxxy(self) -> Self
fn xxxz(self) -> Self
fn xxxw(self) -> Self
fn xxyx(self) -> Self
fn xxyy(self) -> Self
fn xxyz(self) -> Self
fn xxyw(self) -> Self
fn xxzx(self) -> Self
fn xxzy(self) -> Self
fn xxzz(self) -> Self
fn xxzw(self) -> Self
fn xxwx(self) -> Self
fn xxwy(self) -> Self
fn xxwz(self) -> Self
fn xxww(self) -> Self
fn xyxx(self) -> Self
fn xyxy(self) -> Self
fn xyxz(self) -> Self
fn xyxw(self) -> Self
fn xyyx(self) -> Self
fn xyyy(self) -> Self
fn xyyz(self) -> Self
fn xyyw(self) -> Self
fn xyzx(self) -> Self
fn xyzy(self) -> Self
fn xyzz(self) -> Self
fn xywx(self) -> Self
fn xywy(self) -> Self
fn xywz(self) -> Self
fn xyww(self) -> Self
fn xzxx(self) -> Self
fn xzxy(self) -> Self
fn xzxz(self) -> Self
fn xzxw(self) -> Self
fn xzyx(self) -> Self
fn xzyy(self) -> Self
fn xzyz(self) -> Self
fn xzyw(self) -> Self
fn xzzx(self) -> Self
fn xzzy(self) -> Self
fn xzzz(self) -> Self
fn xzzw(self) -> Self
fn xzwx(self) -> Self
fn xzwy(self) -> Self
fn xzwz(self) -> Self
fn xzww(self) -> Self
fn xwxx(self) -> Self
fn xwxy(self) -> Self
fn xwxz(self) -> Self
fn xwxw(self) -> Self
fn xwyx(self) -> Self
fn xwyy(self) -> Self
fn xwyz(self) -> Self
fn xwyw(self) -> Self
fn xwzx(self) -> Self
fn xwzy(self) -> Self
fn xwzz(self) -> Self
fn xwzw(self) -> Self
fn xwwx(self) -> Self
fn xwwy(self) -> Self
fn xwwz(self) -> Self
fn xwww(self) -> Self
fn yxxx(self) -> Self
fn yxxy(self) -> Self
fn yxxz(self) -> Self
fn yxxw(self) -> Self
fn yxyx(self) -> Self
fn yxyy(self) -> Self
fn yxyz(self) -> Self
fn yxyw(self) -> Self
fn yxzx(self) -> Self
fn yxzy(self) -> Self
fn yxzz(self) -> Self
fn yxzw(self) -> Self
fn yxwx(self) -> Self
fn yxwy(self) -> Self
fn yxwz(self) -> Self
fn yxww(self) -> Self
fn yyxx(self) -> Self
fn yyxy(self) -> Self
fn yyxz(self) -> Self
fn yyxw(self) -> Self
fn yyyx(self) -> Self
fn yyyy(self) -> Self
fn yyyz(self) -> Self
fn yyyw(self) -> Self
fn yyzx(self) -> Self
fn yyzy(self) -> Self
fn yyzz(self) -> Self
fn yyzw(self) -> Self
fn yywx(self) -> Self
fn yywy(self) -> Self
fn yywz(self) -> Self
fn yyww(self) -> Self
fn yzxx(self) -> Self
fn yzxy(self) -> Self
fn yzxz(self) -> Self
fn yzxw(self) -> Self
fn yzyx(self) -> Self
fn yzyy(self) -> Self
fn yzyz(self) -> Self
fn yzyw(self) -> Self
fn yzzx(self) -> Self
fn yzzy(self) -> Self
fn yzzz(self) -> Self
fn yzzw(self) -> Self
fn yzwx(self) -> Self
fn yzwy(self) -> Self
fn yzwz(self) -> Self
fn yzww(self) -> Self
fn ywxx(self) -> Self
fn ywxy(self) -> Self
fn ywxz(self) -> Self
fn ywxw(self) -> Self
fn ywyx(self) -> Self
fn ywyy(self) -> Self
fn ywyz(self) -> Self
fn ywyw(self) -> Self
fn ywzx(self) -> Self
fn ywzy(self) -> Self
fn ywzz(self) -> Self
fn ywzw(self) -> Self
fn ywwx(self) -> Self
fn ywwy(self) -> Self
fn ywwz(self) -> Self
fn ywww(self) -> Self
fn zxxx(self) -> Self
fn zxxy(self) -> Self
fn zxxz(self) -> Self
fn zxxw(self) -> Self
fn zxyx(self) -> Self
fn zxyy(self) -> Self
fn zxyz(self) -> Self
fn zxyw(self) -> Self
fn zxzx(self) -> Self
fn zxzy(self) -> Self
fn zxzz(self) -> Self
fn zxzw(self) -> Self
fn zxwx(self) -> Self
fn zxwy(self) -> Self
fn zxwz(self) -> Self
fn zxww(self) -> Self
fn zyxx(self) -> Self
fn zyxy(self) -> Self
fn zyxz(self) -> Self
fn zyxw(self) -> Self
fn zyyx(self) -> Self
fn zyyy(self) -> Self
fn zyyz(self) -> Self
fn zyyw(self) -> Self
fn zyzx(self) -> Self
fn zyzy(self) -> Self
fn zyzz(self) -> Self
fn zyzw(self) -> Self
fn zywx(self) -> Self
fn zywy(self) -> Self
fn zywz(self) -> Self
fn zyww(self) -> Self
fn zzxx(self) -> Self
fn zzxy(self) -> Self
fn zzxz(self) -> Self
fn zzxw(self) -> Self
fn zzyx(self) -> Self
fn zzyy(self) -> Self
fn zzyz(self) -> Self
fn zzyw(self) -> Self
fn zzzx(self) -> Self
fn zzzy(self) -> Self
fn zzzz(self) -> Self
fn zzzw(self) -> Self
fn zzwx(self) -> Self
fn zzwy(self) -> Self
fn zzwz(self) -> Self
fn zzww(self) -> Self
fn zwxx(self) -> Self
fn zwxy(self) -> Self
fn zwxz(self) -> Self
fn zwxw(self) -> Self
fn zwyx(self) -> Self
fn zwyy(self) -> Self
fn zwyz(self) -> Self
fn zwyw(self) -> Self
fn zwzx(self) -> Self
fn zwzy(self) -> Self
fn zwzz(self) -> Self
fn zwzw(self) -> Self
fn zwwx(self) -> Self
fn zwwy(self) -> Self
fn zwwz(self) -> Self
fn zwww(self) -> Self
fn wxxx(self) -> Self
fn wxxy(self) -> Self
fn wxxz(self) -> Self
fn wxxw(self) -> Self
fn wxyx(self) -> Self
fn wxyy(self) -> Self
fn wxyz(self) -> Self
fn wxyw(self) -> Self
fn wxzx(self) -> Self
fn wxzy(self) -> Self
fn wxzz(self) -> Self
fn wxzw(self) -> Self
fn wxwx(self) -> Self
fn wxwy(self) -> Self
fn wxwz(self) -> Self
fn wxww(self) -> Self
fn wyxx(self) -> Self
fn wyxy(self) -> Self
fn wyxz(self) -> Self
fn wyxw(self) -> Self
fn wyyx(self) -> Self
fn wyyy(self) -> Self
fn wyyz(self) -> Self
fn wyyw(self) -> Self
fn wyzx(self) -> Self
fn wyzy(self) -> Self
fn wyzz(self) -> Self
fn wyzw(self) -> Self
fn wywx(self) -> Self
fn wywy(self) -> Self
fn wywz(self) -> Self
fn wyww(self) -> Self
fn wzxx(self) -> Self
fn wzxy(self) -> Self
fn wzxz(self) -> Self
fn wzxw(self) -> Self
fn wzyx(self) -> Self
fn wzyy(self) -> Self
fn wzyz(self) -> Self
fn wzyw(self) -> Self
fn wzzx(self) -> Self
fn wzzy(self) -> Self
fn wzzz(self) -> Self
fn wzzw(self) -> Self
fn wzwx(self) -> Self
fn wzwy(self) -> Self
fn wzwz(self) -> Self
fn wzww(self) -> Self
fn wwxx(self) -> Self
fn wwxy(self) -> Self
fn wwxz(self) -> Self
fn wwxw(self) -> Self
fn wwyx(self) -> Self
fn wwyy(self) -> Self
fn wwyz(self) -> Self
fn wwyw(self) -> Self
fn wwzx(self) -> Self
fn wwzy(self) -> Self
fn wwzz(self) -> Self
fn wwzw(self) -> Self
fn wwwx(self) -> Self
fn wwwy(self) -> Self
fn wwwz(self) -> Self
fn wwww(self) -> Self
fn xyzw(self) -> Self
impl Copy for Vec4
impl Pod for Vec4
Auto Trait Implementations§
impl Freeze for Vec4
impl RefUnwindSafe for Vec4
impl Send for Vec4
impl Sync for Vec4
impl Unpin for Vec4
impl UnwindSafe for Vec4
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.