Skip to main content

Vector

Struct Vector 

Source
pub struct Vector<const N: usize, T, A: Alignment>(/* private fields */)
where
    T: Scalar,
    Length<N>: SupportedLength;
Expand description

A generic vector type.

This type is the generic form of these type aliases:

This type is generic over:

  • N: Length (2, 3, or 4).
  • T: Scalar type.
  • A: Alignment (see Alignment).

§Memory Layout

TypeSizeAlignment
Vec2<T>size_of::<T>() * 2See below
Vec3<T>See belowSee below
Vec4<T>size_of::<T>() * 4See below
Vec2U<T>size_of::<T>() * 2align_of::<T>()
Vec3U<T>size_of::<T>() * 3align_of::<T>()
Vec4U<T>size_of::<T>() * 4align_of::<T>()

The alignment of aligned vectors can be anything from the alignment of T to the size of the vector.

The size of Vec3<T> can either be size_of::<T>() * 3 or size_of::<T>() * 4. If its size is times 4, the padding is guaranteed to be an initialized value of T.

The specific representation of each vector type is controlled by the ScalarBackend trait.

Implementations§

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>

Source

pub const fn from_array(array: [T; N]) -> Self

Creates a vector from an array.

Source

pub const fn splat(value: T) -> Self

Creates a vector with all elements set to the given value.

Source

pub fn from_fn(f: impl FnMut(usize) -> T) -> Self

Creates a vector by calling function f for each element index.

Equivalent to (f(0), f(1), f(2), ...).

Source

pub const fn to_alignment<A2: Alignment>(self) -> Vector<N, T, A2>

Converts the vector to the specified alignment.

Source

pub const fn align(self) -> Vector<N, T, Aligned>

Converts the alignment of the vector to Aligned.

Source

pub const fn unalign(self) -> Vector<N, T, Unaligned>

Converts the alignment of the vector to Unaligned.

Source

pub const fn to_array(self) -> [T; N]

Converts the vector to an array.

Source

pub const fn as_array_ref(&self) -> &[T; N]

Returns a reference to the vector’s elements.

Source

pub const fn as_array_mut(&mut self) -> &mut [T; N]

Returns a mutable reference to the vector’s elements.

Source

pub fn iter(self) -> IntoIter<T, N>

Returns an iterator over the vector’s elements.

This method returns an iterator over T and not &T. to iterate over references use vec.as_array_ref().iter().

Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns an iterator over mutable references to the vector’s elements.

Source

pub fn map<T2: Scalar>(self, f: impl Fn(T) -> T2) -> Vector<N, T2, A>

Calls function f for each element of the vector and returns the result.

Source

pub const fn get(self, index: usize) -> Option<T>

Returns the element at the given index, or None if the index is out of bounds.

Source

pub const fn get_mut(&mut self, index: usize) -> Option<&mut T>

Returns a mutable reference to the element at the given index, or None if the index is out of bounds.

Source

pub fn reverse(self) -> Self

Returns the vector with its components in reverse order.

Source

pub fn repr(self) -> <T as ScalarBackend<N, A>>::VectorRepr
where T: ScalarBackend<N, A>,

Returns the internal representation of the vector.

The internal representation is controlled by the implementation for the ScalarBackend trait.

This function should not be used outside the implementation for ScalarBackend because the internal representation could change silently and cause compile errors.

Source

pub unsafe fn from_repr(repr: <T as ScalarBackend<N, A>>::VectorRepr) -> Self
where T: ScalarBackend<N, A>,

Creates a vector from its internal representation.

The internal representation is controlled by the implementation for the ScalarBackend trait.

This function should not be used outside the implementation for ScalarBackend because the internal representation could change silently and cause compile errors.

§Safety

The provided value must be valid for this vector type, because the internal type may have less memory safety requirements than T.

§

impl<const N: usize, A: Alignment> Vector<N, f32, A>

pub fn is_nan(self) -> bool

Returns true if any component of self is NaN.

pub fn is_finite(self) -> bool

Returns true if all components of self are finite.

pub fn recip(self) -> Self

Computes 1.0 / self.

pub fn element_sum(self) -> f32

Computes the sum of the vector’s elements.

The order of addition is unspecified and may differ between target architectures.

pub fn element_product(self) -> f32

Computes the product of the vector’s elements.

The order of multiplication is unspecified and may differ between target architectures.

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN or if min > max.

pub fn max_element(self) -> f32

Returns the maximum component of the vector.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN.

pub fn min_element(self) -> f32

Returns the minimum component of the vector.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN.

pub fn abs(self) -> Self

Returns the absolute values of the components of self.

pub fn signum(self) -> Self

Returns the signum of the components of self.

For each component:

  • 1.0 if the component is positive or +0.0.
  • -1.0 if the component is negative or -0.0.
  • NaN if the component is NaN.

pub fn copysign(self, sign: Self) -> Self

Returns a vector with the magnitudes of self and the signs of sign.

pub fn dot(self, rhs: Self) -> f32

Computes the dot product of self and rhs.

pub fn length_squared(self) -> f32

Computes the squared length/magnitude of self.

pub fn distance_squared(self, other: Self) -> f32

Computes the squared euclidean distance between self and other.

pub fn lerp(self, other: Self, t: f32) -> Self

Computes the linear interpolation between self and other based on the value t.

When t is 0.0, the result is self. When t is 1.0, the result is rhs. When t is outside of the range [0.0, 1.0], the result is linearly extrapolated.

pub fn midpoint(self, other: Self) -> Self

Computes the midpoint between self and other.

This function is equivalent to self.lerp(other, 0.5) but is cheaper to compute.

This function may return a slightly different value than lerp.

pub fn is_normalized(self) -> bool

Returns whether self has the length 1.0 or not.

This function uses a precision threshold of approximately 1e-4.

pub fn project_onto(self, other: Self) -> Self

Returns the vector projection of self onto other.

other must not be a zero vector.

§Panics

When assertions are enabled, this function panics if other is a zero vector.

pub fn project_onto_normalized(self, other: Self) -> Self

Returns the vector projection of self onto other.

other must be normalized.

§Panics

When assertions are enabled, this function panics if other is not normalized.

pub fn reject_from(self, other: Self) -> Self

Returns the vector rejection of self from other.

Vector rejection is the vector pointing from the projection to the original vector. Basically: self - self.project_onto(other).

other must not be a zero vector.

§Panics

When assertions are enabled, this function panics if other is a zero vector.

pub fn reject_from_normalized(self, other: Self) -> Self

Returns the vector rejection of self from other.

Vector rejection is the vector pointing from the projection to the original vector. Basically: self - self.project_onto(other).

other must be normalized.

§Panics

When assertions are enabled, this function panics if other is not normalized.

pub fn reflect(self, normal: Self) -> Self

Returns the vector reflection for self with normal.

Vector reflection is the reflection of the vector on a surface with the given normal.

normal must be normalized.

§Panics

When assertions are enabled, this function panics if normal is not normalized.

§

impl<A: Alignment> Vector<3, f32, A>

pub fn cross(self, rhs: Self) -> Self

Computes the cross product of self and rhs.

pub fn any_orthogonal_vector(self) -> Self

Returns some vector that is orthogonal to self.

self must be finite and not a zero vector.

The output vector is not necessarily normalized. For that use Self::any_orthonormal_vector() instead.

pub fn any_orthonormal_vector(self) -> Self

Returns some unit vector that is orthogonal to self.

self must normalized.

§Panics

When assertions are enabled, this function panics if self is not normalized.

pub fn any_orthonormal_pair(self) -> (Self, Self)

Returns two unit vectors that are orthogonal to self and to each other.

Together with self, they form an orthonormal basis where the three vectors are orthogonal to each other and are normalized.

§Panics

When assertions are enabled, this function panics if self is not normalized.

§

impl<const N: usize, A: Alignment> Vector<N, f32, A>

pub fn floor(self) -> Self

Rounds the components of self down.

pub fn ceil(self) -> Self

Rounds the components of self up.

pub fn round(self) -> Self

Rounds the components of self to the nearest integer.

pub fn trunc(self) -> Self

Rounds the components of self towards zero.

pub fn fract(self) -> Self

Returns the fractional part of self.

This function is equivalent to self - self.trunc().

pub fn mul_add(self, a: Self, b: Self) -> Self

Fused Multiply Add. Computes self * a + b with only one rounding error instead of two.

This is slower than an unfused multiply add for most target architectures.

This function is guaranteed to return the exact same value as the standard library.

pub fn div_euclid(self, rhs: Self) -> Self

Euclidiean Division.

This function is guaranteed to return the exact same value as the standard library.

pub fn rem_euclid(self, rhs: Self) -> Self

Euclidiean Remainder.

This function is guaranteed to return the exact same value as the standard library.

pub fn sqrt(self) -> Self

Computes the square root of the components of self.

This function is guaranteed to return the exact same value as the standard library.

pub fn sin(self) -> Self

Computes the sine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn cos(self) -> Self

Computes the cosine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn tan(self) -> Self

Computes the tangent of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn asin(self) -> Self

Computes the arc sine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn acos(self) -> Self

Computes the arc cosine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn atan(self) -> Self

Computes the arc tangent of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn sin_cos(self) -> (Self, Self)

Simultaneously computes the sine and cosine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn length(self) -> f32

Returns the length/magnitude of self.

pub fn distance(self, other: Self) -> f32

Computes the euclidean distance between self and other.

pub fn move_towards(self, other: Self, max_delta: f32) -> Self

Moves self towards other by the value max_delta.

When max_delta is 0.0, the result is self. When max_delta is equal to or greater than self.distance(other), the result is other.

pub fn normalize(self) -> Self

Returns a vector with the direction of self and length 1.0.

§Panics

When assertions are enabled, this function panics if the input is zero or if the result is non finite or zero.

pub fn try_normalize(self) -> Option<Self>

Computes self.normalize or returns None if the input is zero or if the result is non finite or zero.

pub fn normalize_or(self, fallback: Self) -> Self

Computes self.normalize or returns fallback if the input is zero or if the result is non finite or zero.

pub fn normalize_or_zero(self) -> Self

Computes self.normalize or returns a zero vector if the input is zero or if the result is non finite or zero.

pub fn normalize_and_length(self) -> (Self, f32)

Computes self.normalize() and self.length().

If self is a zero vector, the function returns (Self::ZERO, 0.0).

pub fn with_max_length(self, max: f32) -> Self

Returns self with a length of no more than max.

§Panics

When assertions are enabled, this function panics if max is negative.

pub fn with_min_length(self, min: f32) -> Self

Returns self with a length of no less than min.

§Panics

When assertions are enabled, this function panics if min is negative.

pub fn clamp_length(self, min: f32, max: f32) -> Self

Returns self with a length of no less than min and no more than max.

§Panics

When assertions are enabled, this function panics if min is greater than max, or if either min or max are negative.

pub fn angle_between(self, other: Self) -> f32

Computes the angle (in radians) between two vectors in the range [0, +π].

The vectors do not need to be unit vectors but they do need to be non-zero.

This function has unspecified precision.

pub fn exp(self) -> Self

Computes the exponential function e^self for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn exp2(self) -> Self

Computes 2^self for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn ln(self) -> Self

Computes the natural logarithm for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn log2(self) -> Self

Computes the base 2 logarithm for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn powf(self, n: f32) -> Self

Computes self^n for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn refract(self, normal: Self, eta: f32) -> Self

Returns the vector refraction of self through normal and eta.

eta is the incident index divided by the transmitted index.

When total internal reflection occurs, this function returns a zero vector.

self and normal must be normalized.

§Panics

When assertions are enabled, this function panics if self or normal are not normalized.

§

impl<A: Alignment> Vector<2, f32, A>

pub fn perp(self) -> Self

Returns self rotated by 90 degrees.

pub fn rotate(self, angle: f32) -> Self

Rotates self by angle (in radians).

This function has unspecified precision.

§

impl<A: Alignment> Vector<3, f32, A>

pub fn rotate_x(self, angle: f32) -> Self

Rotates self around the x axis by angle (in radians).

This function has unspecified precision.

pub fn rotate_y(self, angle: f32) -> Self

Rotates self around the y axis by angle (in radians).

This function has unspecified precision.

pub fn rotate_z(self, angle: f32) -> Self

Rotates self around the z axis by angle (in radians).

This function has unspecified precision.

§

impl<const N: usize, A: Alignment> Vector<N, f64, A>

pub fn is_nan(self) -> bool

Returns true if any component of self is NaN.

pub fn is_finite(self) -> bool

Returns true if all components of self are finite.

pub fn recip(self) -> Self

Computes 1.0 / self.

pub fn element_sum(self) -> f64

Computes the sum of the vector’s elements.

The order of addition is unspecified and may differ between target architectures.

pub fn element_product(self) -> f64

Computes the product of the vector’s elements.

The order of multiplication is unspecified and may differ between target architectures.

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN or if min > max.

pub fn max_element(self) -> f64

Returns the maximum component of the vector.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN.

pub fn min_element(self) -> f64

Returns the minimum component of the vector.

This function is not consistent with IEEE semantics in regards to NaN propagation and handling of -0.0.

§Panics

When assertions are enabled, this function panics if any input is NaN.

pub fn abs(self) -> Self

Returns the absolute values of the components of self.

pub fn signum(self) -> Self

Returns the signum of the components of self.

For each component:

  • 1.0 if the component is positive or +0.0.
  • -1.0 if the component is negative or -0.0.
  • NaN if the component is NaN.

pub fn copysign(self, sign: Self) -> Self

Returns a vector with the magnitudes of self and the signs of sign.

pub fn dot(self, rhs: Self) -> f64

Computes the dot product of self and rhs.

pub fn length_squared(self) -> f64

Computes the squared length/magnitude of self.

pub fn distance_squared(self, other: Self) -> f64

Computes the squared euclidean distance between self and other.

pub fn lerp(self, other: Self, t: f64) -> Self

Computes the linear interpolation between self and other based on the value t.

When t is 0.0, the result is self. When t is 1.0, the result is rhs. When t is outside of the range [0.0, 1.0], the result is linearly extrapolated.

pub fn midpoint(self, other: Self) -> Self

Computes the midpoint between self and other.

This function is equivalent to self.lerp(other, 0.5) but is cheaper to compute.

This function may return a slightly different value than lerp.

pub fn is_normalized(self) -> bool

Returns whether self has the length 1.0 or not.

This function uses a precision threshold of approximately 1e-4.

pub fn project_onto(self, other: Self) -> Self

Returns the vector projection of self onto other.

other must not be a zero vector.

§Panics

When assertions are enabled, this function panics if other is a zero vector.

pub fn project_onto_normalized(self, other: Self) -> Self

Returns the vector projection of self onto other.

other must be normalized.

§Panics

When assertions are enabled, this function panics if other is not normalized.

pub fn reject_from(self, other: Self) -> Self

Returns the vector rejection of self from other.

Vector rejection is the vector pointing from the projection to the original vector. Basically: self - self.project_onto(other).

other must not be a zero vector.

§Panics

When assertions are enabled, this function panics if other is a zero vector.

pub fn reject_from_normalized(self, other: Self) -> Self

Returns the vector rejection of self from other.

Vector rejection is the vector pointing from the projection to the original vector. Basically: self - self.project_onto(other).

other must be normalized.

§Panics

When assertions are enabled, this function panics if other is not normalized.

pub fn reflect(self, normal: Self) -> Self

Returns the vector reflection for self with normal.

Vector reflection is the reflection of the vector on a surface with the given normal.

normal must be normalized.

§Panics

When assertions are enabled, this function panics if normal is not normalized.

§

impl<A: Alignment> Vector<3, f64, A>

pub fn cross(self, rhs: Self) -> Self

Computes the cross product of self and rhs.

pub fn any_orthogonal_vector(self) -> Self

Returns some vector that is orthogonal to self.

self must be finite and not a zero vector.

The output vector is not necessarily normalized. For that use Self::any_orthonormal_vector() instead.

pub fn any_orthonormal_vector(self) -> Self

Returns some unit vector that is orthogonal to self.

self must normalized.

§Panics

When assertions are enabled, this function panics if self is not normalized.

pub fn any_orthonormal_pair(self) -> (Self, Self)

Returns two unit vectors that are orthogonal to self and to each other.

Together with self, they form an orthonormal basis where the three vectors are orthogonal to each other and are normalized.

§Panics

When assertions are enabled, this function panics if self is not normalized.

§

impl<const N: usize, A: Alignment> Vector<N, f64, A>

pub fn floor(self) -> Self

Rounds the components of self down.

pub fn ceil(self) -> Self

Rounds the components of self up.

pub fn round(self) -> Self

Rounds the components of self to the nearest integer.

pub fn trunc(self) -> Self

Rounds the components of self towards zero.

pub fn fract(self) -> Self

Returns the fractional part of self.

This function is equivalent to self - self.trunc().

pub fn mul_add(self, a: Self, b: Self) -> Self

Fused Multiply Add. Computes self * a + b with only one rounding error instead of two.

This is slower than an unfused multiply add for most target architectures.

This function is guaranteed to return the exact same value as the standard library.

pub fn div_euclid(self, rhs: Self) -> Self

Euclidiean Division.

This function is guaranteed to return the exact same value as the standard library.

pub fn rem_euclid(self, rhs: Self) -> Self

Euclidiean Remainder.

This function is guaranteed to return the exact same value as the standard library.

pub fn sqrt(self) -> Self

Computes the square root of the components of self.

This function is guaranteed to return the exact same value as the standard library.

pub fn sin(self) -> Self

Computes the sine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn cos(self) -> Self

Computes the cosine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn tan(self) -> Self

Computes the tangent of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn asin(self) -> Self

Computes the arc sine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn acos(self) -> Self

Computes the arc cosine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn atan(self) -> Self

Computes the arc tangent of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn sin_cos(self) -> (Self, Self)

Simultaneously computes the sine and cosine of the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn length(self) -> f64

Returns the length/magnitude of self.

pub fn distance(self, other: Self) -> f64

Computes the euclidean distance between self and other.

pub fn move_towards(self, other: Self, max_delta: f64) -> Self

Moves self towards other by the value max_delta.

When max_delta is 0.0, the result is self. When max_delta is equal to or greater than self.distance(other), the result is other.

pub fn normalize(self) -> Self

Returns a vector with the direction of self and length 1.0.

§Panics

When assertions are enabled, this function panics if the input is zero or if the result is non finite or zero.

pub fn try_normalize(self) -> Option<Self>

Computes self.normalize or returns None if the input is zero or if the result is non finite or zero.

pub fn normalize_or(self, fallback: Self) -> Self

Computes self.normalize or returns fallback if the input is zero or if the result is non finite or zero.

pub fn normalize_or_zero(self) -> Self

Computes self.normalize or returns a zero vector if the input is zero or if the result is non finite or zero.

pub fn normalize_and_length(self) -> (Self, f64)

Computes self.normalize() and self.length().

If self is a zero vector, the function returns (Self::ZERO, 0.0).

pub fn with_max_length(self, max: f64) -> Self

Returns self with a length of no more than max.

§Panics

When assertions are enabled, this function panics if max is negative.

pub fn with_min_length(self, min: f64) -> Self

Returns self with a length of no less than min.

§Panics

When assertions are enabled, this function panics if min is negative.

pub fn clamp_length(self, min: f64, max: f64) -> Self

Returns self with a length of no less than min and no more than max.

§Panics

When assertions are enabled, this function panics if min is greater than max, or if either min or max are negative.

pub fn angle_between(self, other: Self) -> f64

Computes the angle (in radians) between two vectors in the range [0, +π].

The vectors do not need to be unit vectors but they do need to be non-zero.

This function has unspecified precision.

pub fn exp(self) -> Self

Computes the exponential function e^self for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn exp2(self) -> Self

Computes 2^self for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn ln(self) -> Self

Computes the natural logarithm for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn log2(self) -> Self

Computes the base 2 logarithm for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn powf(self, n: f64) -> Self

Computes self^n for the components of self.

This function has unspecified precision and may return a different value than the standard library.

pub fn refract(self, normal: Self, eta: f64) -> Self

Returns the vector refraction of self through normal and eta.

eta is the incident index divided by the transmitted index.

When total internal reflection occurs, this function returns a zero vector.

self and normal must be normalized.

§Panics

When assertions are enabled, this function panics if self or normal are not normalized.

§

impl<A: Alignment> Vector<2, f64, A>

pub fn perp(self) -> Self

Returns self rotated by 90 degrees.

pub fn rotate(self, angle: f64) -> Self

Rotates self by angle (in radians).

This function has unspecified precision.

§

impl<A: Alignment> Vector<3, f64, A>

pub fn rotate_x(self, angle: f64) -> Self

Rotates self around the x axis by angle (in radians).

This function has unspecified precision.

pub fn rotate_y(self, angle: f64) -> Self

Rotates self around the y axis by angle (in radians).

This function has unspecified precision.

pub fn rotate_z(self, angle: f64) -> Self

Rotates self around the z axis by angle (in radians).

This function has unspecified precision.

§

impl<const N: usize, A: Alignment> Vector<N, i8, A>

pub fn element_sum(self) -> i8

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> i8

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> i8

Returns the maximum out of the elements of self.

pub fn min_element(self) -> i8

Returns the minimum out of the elements of self.

pub fn abs(self) -> Self

Returns the absolute values of the components of self.

§Panics

When assertions or overflow checks are enabled, this function panics if any input is T::MIN.

pub fn signum(self) -> Self

Returns the signum of the components of self.

For each component:

  • 0 if the component is zero
  • 1 if the component is positive
  • -1 if the component is negative

pub fn dot(self, rhs: Self) -> i8

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> i8

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn distance_squared(self, other: Self) -> i8

Computes the squared euclidean distance between self and other.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero or overflow occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero or overflow occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_div(self, rhs: Self) -> Self

Computes self / rhs, saturating at the numeric bounds instead of overflowing.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

pub fn wrapping_div(self, rhs: Self) -> Self

Computes self / rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_rem(self, rhs: Self) -> Self

Computes self % rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

§

impl<A: Alignment> Vector<2, i8, A>

pub fn perp(self) -> Self

Returns self rotated by 90 degrees.

§

impl<A: Alignment> Vector<3, i8, A>

pub fn cross(self, rhs: Self) -> Self

Computes the cross product of self and rhs.

§

impl<const N: usize, A: Alignment> Vector<N, i16, A>

pub fn element_sum(self) -> i16

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> i16

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> i16

Returns the maximum out of the elements of self.

pub fn min_element(self) -> i16

Returns the minimum out of the elements of self.

pub fn abs(self) -> Self

Returns the absolute values of the components of self.

§Panics

When assertions or overflow checks are enabled, this function panics if any input is T::MIN.

pub fn signum(self) -> Self

Returns the signum of the components of self.

For each component:

  • 0 if the component is zero
  • 1 if the component is positive
  • -1 if the component is negative

pub fn dot(self, rhs: Self) -> i16

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> i16

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn distance_squared(self, other: Self) -> i16

Computes the squared euclidean distance between self and other.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero or overflow occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero or overflow occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_div(self, rhs: Self) -> Self

Computes self / rhs, saturating at the numeric bounds instead of overflowing.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

pub fn wrapping_div(self, rhs: Self) -> Self

Computes self / rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_rem(self, rhs: Self) -> Self

Computes self % rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

§

impl<A: Alignment> Vector<2, i16, A>

pub fn perp(self) -> Self

Returns self rotated by 90 degrees.

§

impl<A: Alignment> Vector<3, i16, A>

pub fn cross(self, rhs: Self) -> Self

Computes the cross product of self and rhs.

§

impl<const N: usize, A: Alignment> Vector<N, i32, A>

pub fn element_sum(self) -> i32

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> i32

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> i32

Returns the maximum out of the elements of self.

pub fn min_element(self) -> i32

Returns the minimum out of the elements of self.

pub fn abs(self) -> Self

Returns the absolute values of the components of self.

§Panics

When assertions or overflow checks are enabled, this function panics if any input is T::MIN.

pub fn signum(self) -> Self

Returns the signum of the components of self.

For each component:

  • 0 if the component is zero
  • 1 if the component is positive
  • -1 if the component is negative

pub fn dot(self, rhs: Self) -> i32

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> i32

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn distance_squared(self, other: Self) -> i32

Computes the squared euclidean distance between self and other.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero or overflow occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero or overflow occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_div(self, rhs: Self) -> Self

Computes self / rhs, saturating at the numeric bounds instead of overflowing.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

pub fn wrapping_div(self, rhs: Self) -> Self

Computes self / rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_rem(self, rhs: Self) -> Self

Computes self % rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

§

impl<A: Alignment> Vector<2, i32, A>

pub fn perp(self) -> Self

Returns self rotated by 90 degrees.

§

impl<A: Alignment> Vector<3, i32, A>

pub fn cross(self, rhs: Self) -> Self

Computes the cross product of self and rhs.

§

impl<const N: usize, A: Alignment> Vector<N, i64, A>

pub fn element_sum(self) -> i64

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> i64

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> i64

Returns the maximum out of the elements of self.

pub fn min_element(self) -> i64

Returns the minimum out of the elements of self.

pub fn abs(self) -> Self

Returns the absolute values of the components of self.

§Panics

When assertions or overflow checks are enabled, this function panics if any input is T::MIN.

pub fn signum(self) -> Self

Returns the signum of the components of self.

For each component:

  • 0 if the component is zero
  • 1 if the component is positive
  • -1 if the component is negative

pub fn dot(self, rhs: Self) -> i64

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> i64

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn distance_squared(self, other: Self) -> i64

Computes the squared euclidean distance between self and other.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero or overflow occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero or overflow occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_div(self, rhs: Self) -> Self

Computes self / rhs, saturating at the numeric bounds instead of overflowing.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

pub fn wrapping_div(self, rhs: Self) -> Self

Computes self / rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_rem(self, rhs: Self) -> Self

Computes self % rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

§

impl<A: Alignment> Vector<2, i64, A>

pub fn perp(self) -> Self

Returns self rotated by 90 degrees.

§

impl<A: Alignment> Vector<3, i64, A>

pub fn cross(self, rhs: Self) -> Self

Computes the cross product of self and rhs.

§

impl<const N: usize, A: Alignment> Vector<N, i128, A>

pub fn element_sum(self) -> i128

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> i128

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> i128

Returns the maximum out of the elements of self.

pub fn min_element(self) -> i128

Returns the minimum out of the elements of self.

pub fn abs(self) -> Self

Returns the absolute values of the components of self.

§Panics

When assertions or overflow checks are enabled, this function panics if any input is T::MIN.

pub fn signum(self) -> Self

Returns the signum of the components of self.

For each component:

  • 0 if the component is zero
  • 1 if the component is positive
  • -1 if the component is negative

pub fn dot(self, rhs: Self) -> i128

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> i128

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn distance_squared(self, other: Self) -> i128

Computes the squared euclidean distance between self and other.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero or overflow occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero or overflow occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_div(self, rhs: Self) -> Self

Computes self / rhs, saturating at the numeric bounds instead of overflowing.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

pub fn wrapping_div(self, rhs: Self) -> Self

Computes self / rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_rem(self, rhs: Self) -> Self

Computes self % rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

§

impl<A: Alignment> Vector<2, i128, A>

pub fn perp(self) -> Self

Returns self rotated by 90 degrees.

§

impl<A: Alignment> Vector<3, i128, A>

pub fn cross(self, rhs: Self) -> Self

Computes the cross product of self and rhs.

§

impl<const N: usize, A: Alignment> Vector<N, isize, A>

pub fn element_sum(self) -> isize

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> isize

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> isize

Returns the maximum out of the elements of self.

pub fn min_element(self) -> isize

Returns the minimum out of the elements of self.

pub fn abs(self) -> Self

Returns the absolute values of the components of self.

§Panics

When assertions or overflow checks are enabled, this function panics if any input is T::MIN.

pub fn signum(self) -> Self

Returns the signum of the components of self.

For each component:

  • 0 if the component is zero
  • 1 if the component is positive
  • -1 if the component is negative

pub fn dot(self, rhs: Self) -> isize

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> isize

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn distance_squared(self, other: Self) -> isize

Computes the squared euclidean distance between self and other.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero or overflow occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero or overflow occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_div(self, rhs: Self) -> Self

Computes self / rhs, saturating at the numeric bounds instead of overflowing.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

pub fn wrapping_div(self, rhs: Self) -> Self

Computes self / rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

pub fn wrapping_rem(self, rhs: Self) -> Self

Computes self % rhs, wrapping around at the boundary of the type.

§Panics

This function will panic if rhs is zero.

§

impl<A: Alignment> Vector<2, isize, A>

pub fn perp(self) -> Self

Returns self rotated by 90 degrees.

§

impl<A: Alignment> Vector<3, isize, A>

pub fn cross(self, rhs: Self) -> Self

Computes the cross product of self and rhs.

§

impl<const N: usize, A: Alignment> Vector<N, u8, A>

pub fn element_sum(self) -> u8

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> u8

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> u8

Returns the maximum out of the elements of self.

pub fn min_element(self) -> u8

Returns the minimum out of the elements of self.

pub fn dot(self, rhs: Self) -> u8

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> u8

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

§

impl<const N: usize, A: Alignment> Vector<N, u16, A>

pub fn element_sum(self) -> u16

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> u16

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> u16

Returns the maximum out of the elements of self.

pub fn min_element(self) -> u16

Returns the minimum out of the elements of self.

pub fn dot(self, rhs: Self) -> u16

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> u16

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

§

impl<const N: usize, A: Alignment> Vector<N, u32, A>

pub fn element_sum(self) -> u32

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> u32

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> u32

Returns the maximum out of the elements of self.

pub fn min_element(self) -> u32

Returns the minimum out of the elements of self.

pub fn dot(self, rhs: Self) -> u32

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> u32

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

§

impl<const N: usize, A: Alignment> Vector<N, u64, A>

pub fn element_sum(self) -> u64

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> u64

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> u64

Returns the maximum out of the elements of self.

pub fn min_element(self) -> u64

Returns the minimum out of the elements of self.

pub fn dot(self, rhs: Self) -> u64

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> u64

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

§

impl<const N: usize, A: Alignment> Vector<N, u128, A>

pub fn element_sum(self) -> u128

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> u128

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> u128

Returns the maximum out of the elements of self.

pub fn min_element(self) -> u128

Returns the minimum out of the elements of self.

pub fn dot(self, rhs: Self) -> u128

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> u128

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

§

impl<const N: usize, A: Alignment> Vector<N, usize, A>

pub fn element_sum(self) -> usize

Computes the sum of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any addition overflows (addition is performed in order).

pub fn element_product(self) -> usize

Computes the product of the vector’s elements.

§Panics

When assertions are enabled, this function panics if any multiplication overflows (multiplication is performed in order).

pub fn max(self, other: Self) -> Self

Returns the maximum between the components of self and other.

pub fn min(self, other: Self) -> Self

Returns the minimum between the components of self and other.

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the components of self between the components of min and max.

§Panics

Panics if min > max.

pub fn max_element(self) -> usize

Returns the maximum out of the elements of self.

pub fn min_element(self) -> usize

Returns the minimum out of the elements of self.

pub fn dot(self, rhs: Self) -> usize

Computes the dot product of self and rhs.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn length_squared(self) -> usize

Computes the squared length/magnitude of self.

§Panics

When assertions or overflow checks are enabled, this function panics if an overflow occurs.

pub fn checked_add(self, rhs: Self) -> Option<Self>

Computes self + rhs, returning None if overflow occured.

pub fn checked_sub(self, rhs: Self) -> Option<Self>

Computes self - rhs, returning None if overflow occured.

pub fn checked_mul(self, rhs: Self) -> Option<Self>

Computes self * rhs, returning None if overflow occured.

pub fn checked_div(self, rhs: Self) -> Option<Self>

Computes self / rhs, returning None if division by zero occured.

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Computes self % rhs, returning None if division by zero occurred.

pub fn saturating_add(self, rhs: Self) -> Self

Computes self + rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_sub(self, rhs: Self) -> Self

Computes self - rhs, saturating at the numeric bounds instead of overflowing.

pub fn saturating_mul(self, rhs: Self) -> Self

Computes self * rhs, saturating at the numeric bounds instead of overflowing.

pub fn wrapping_add(self, rhs: Self) -> Self

Computes self + rhs, wrapping around at the boundary of the type.

pub fn wrapping_sub(self, rhs: Self) -> Self

Computes self - rhs, wrapping around at the boundary of the type.

pub fn wrapping_mul(self, rhs: Self) -> Self

Computes self * rhs, wrapping around at the boundary of the type.

Source§

impl<const N: usize, A: Alignment> Vector<N, bool, A>

Source

pub fn all(self) -> bool

Returns true if all components are true.

Source

pub fn any(self) -> bool

Returns true if any component is true.

Source

pub fn select<T: Scalar>( self, if_true: Vector<N, T, A>, if_false: Vector<N, T, A>, ) -> Vector<N, T, A>

Selects elements from if_true and if_false based on the values of the vector.

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>

Source

pub const ZERO: Self

0.

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>
where T: Scalar + One, Length<N>: SupportedLength,

Source

pub const ONE: Self

All 1.

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>

Source

pub const NEG_ONE: Self

All -1.

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>
where T: Scalar + Min, Length<N>: SupportedLength,

Source

pub const MIN: Self

The minimum value representable by T for all elements.

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>
where T: Scalar + Max, Length<N>: SupportedLength,

Source

pub const MAX: Self

The maximum value representable by T for all elements.

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>
where T: Scalar + NaN, Length<N>: SupportedLength,

Source

pub const NAN: Self

All elements set to Not a Number (NaN).

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>

Source

pub const INFINITY: Self

All elements set to Infinity (∞).

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>

Source

pub const NEG_INFINITY: Self

All elements set to Negative Infinity (-∞).

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>

Source

pub const TRUE: Self

All true.

Source§

impl<const N: usize, T, A: Alignment> Vector<N, T, A>

Source

pub const FALSE: Self

All false.

Source§

impl<T, A: Alignment> Vector<2, T, A>
where T: Scalar + Zero + One,

Source

pub const X: Self

(1, 0).

Source

pub const Y: Self

(0, 1).

Source§

impl<T, A: Alignment> Vector<3, T, A>
where T: Scalar + Zero + One,

Source

pub const X: Self

(1, 0, 0).

Source

pub const Y: Self

(0, 1, 0).

Source

pub const Z: Self

(0, 0, 1).

Source§

impl<T, A: Alignment> Vector<4, T, A>
where T: Scalar + Zero + One,

Source

pub const X: Self

(1, 0, 0, 0).

Source

pub const Y: Self

(0, 1, 0, 0).

Source

pub const Z: Self

(0, 0, 1, 0).

Source

pub const W: Self

(0, 0, 0, 1).

Source§

impl<T, A: Alignment> Vector<2, T, A>
where T: Scalar + Zero + NegOne,

Source

pub const NEG_X: Self

(-1, 0).

Source

pub const NEG_Y: Self

(0, -1).

Source§

impl<T, A: Alignment> Vector<3, T, A>
where T: Scalar + Zero + NegOne,

Source

pub const NEG_X: Self

(-1, 0, 0).

Source

pub const NEG_Y: Self

(0, -1, 0).

Source

pub const NEG_Z: Self

(0, 0, -1).

Source§

impl<T, A: Alignment> Vector<4, T, A>
where T: Scalar + Zero + NegOne,

Source

pub const NEG_X: Self

(-1, 0, 0, 0).

Source

pub const NEG_Y: Self

(0, -1, 0, 0).

Source

pub const NEG_Z: Self

(0, 0, -1, 0).

Source

pub const NEG_W: Self

(0, 0, 0, -1).

Source§

impl<T, A: Alignment> Vector<2, T, A>
where T: Scalar,

Source

pub fn xx(self) -> Vector<2, T, A>

Returns (self.x, self.x).

Source

pub fn xy(self) -> Vector<2, T, A>

Returns (self.x, self.y).

Source

pub fn yx(self) -> Vector<2, T, A>

Returns (self.y, self.x).

Source

pub fn yy(self) -> Vector<2, T, A>

Returns (self.y, self.y).

Source

pub fn xxx(self) -> Vector<3, T, A>

Returns (self.x, self.x, self.x).

Source

pub fn xxy(self) -> Vector<3, T, A>

Returns (self.x, self.x, self.y).

Source

pub fn xyx(self) -> Vector<3, T, A>

Returns (self.x, self.y, self.x).

Source

pub fn xyy(self) -> Vector<3, T, A>

Returns (self.x, self.y, self.y).

Source

pub fn yxx(self) -> Vector<3, T, A>

Returns (self.y, self.x, self.x).

Source

pub fn yxy(self) -> Vector<3, T, A>

Returns (self.y, self.x, self.y).

Source

pub fn yyx(self) -> Vector<3, T, A>

Returns (self.y, self.y, self.x).

Source

pub fn yyy(self) -> Vector<3, T, A>

Returns (self.y, self.y, self.y).

Source

pub fn xxxx(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.x, self.x).

Source

pub fn xxxy(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.x, self.y).

Source

pub fn xxyx(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.y, self.x).

Source

pub fn xxyy(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.y, self.y).

Source

pub fn xyxx(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.x, self.x).

Source

pub fn xyxy(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.x, self.y).

Source

pub fn xyyx(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.y, self.x).

Source

pub fn xyyy(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.y, self.y).

Source

pub fn yxxx(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.x, self.x).

Source

pub fn yxxy(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.x, self.y).

Source

pub fn yxyx(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.y, self.x).

Source

pub fn yxyy(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.y, self.y).

Source

pub fn yyxx(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.x, self.x).

Source

pub fn yyxy(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.x, self.y).

Source

pub fn yyyx(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.y, self.x).

Source

pub fn yyyy(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.y, self.y).

Source

pub fn with_x(self, value: T) -> Self

Returns the vector with the x component set to the given value.

Source

pub fn with_y(self, value: T) -> Self

Returns the vector with the y component set to the given value.

Source

pub fn with_xy(self, value: Vector<2, T, A>) -> Self

Returns the vector with the x and y components set to the given values.

Source

pub fn with_yx(self, value: Vector<2, T, A>) -> Self

Returns the vector with the y and x components set to the given values.

Source§

impl<T, A: Alignment> Vector<3, T, A>
where T: Scalar,

Source

pub fn xx(self) -> Vector<2, T, A>

Returns (self.x, self.x).

Source

pub fn xy(self) -> Vector<2, T, A>

Returns (self.x, self.y).

Source

pub fn xz(self) -> Vector<2, T, A>

Returns (self.x, self.z).

Source

pub fn yx(self) -> Vector<2, T, A>

Returns (self.y, self.x).

Source

pub fn yy(self) -> Vector<2, T, A>

Returns (self.y, self.y).

Source

pub fn yz(self) -> Vector<2, T, A>

Returns (self.y, self.z).

Source

pub fn zx(self) -> Vector<2, T, A>

Returns (self.z, self.x).

Source

pub fn zy(self) -> Vector<2, T, A>

Returns (self.z, self.y).

Source

pub fn zz(self) -> Vector<2, T, A>

Returns (self.z, self.z).

Source

pub fn xxx(self) -> Vector<3, T, A>

Returns (self.x, self.x, self.x).

Source

pub fn xxy(self) -> Vector<3, T, A>

Returns (self.x, self.x, self.y).

Source

pub fn xxz(self) -> Vector<3, T, A>

Returns (self.x, self.x, self.z).

Source

pub fn xyx(self) -> Vector<3, T, A>

Returns (self.x, self.y, self.x).

Source

pub fn xyy(self) -> Vector<3, T, A>

Returns (self.x, self.y, self.y).

Source

pub fn xyz(self) -> Vector<3, T, A>

Returns (self.x, self.y, self.z).

Source

pub fn xzx(self) -> Vector<3, T, A>

Returns (self.x, self.z, self.x).

Source

pub fn xzy(self) -> Vector<3, T, A>

Returns (self.x, self.z, self.y).

Source

pub fn xzz(self) -> Vector<3, T, A>

Returns (self.x, self.z, self.z).

Source

pub fn yxx(self) -> Vector<3, T, A>

Returns (self.y, self.x, self.x).

Source

pub fn yxy(self) -> Vector<3, T, A>

Returns (self.y, self.x, self.y).

Source

pub fn yxz(self) -> Vector<3, T, A>

Returns (self.y, self.x, self.z).

Source

pub fn yyx(self) -> Vector<3, T, A>

Returns (self.y, self.y, self.x).

Source

pub fn yyy(self) -> Vector<3, T, A>

Returns (self.y, self.y, self.y).

Source

pub fn yyz(self) -> Vector<3, T, A>

Returns (self.y, self.y, self.z).

Source

pub fn yzx(self) -> Vector<3, T, A>

Returns (self.y, self.z, self.x).

Source

pub fn yzy(self) -> Vector<3, T, A>

Returns (self.y, self.z, self.y).

Source

pub fn yzz(self) -> Vector<3, T, A>

Returns (self.y, self.z, self.z).

Source

pub fn zxx(self) -> Vector<3, T, A>

Returns (self.z, self.x, self.x).

Source

pub fn zxy(self) -> Vector<3, T, A>

Returns (self.z, self.x, self.y).

Source

pub fn zxz(self) -> Vector<3, T, A>

Returns (self.z, self.x, self.z).

Source

pub fn zyx(self) -> Vector<3, T, A>

Returns (self.z, self.y, self.x).

Source

pub fn zyy(self) -> Vector<3, T, A>

Returns (self.z, self.y, self.y).

Source

pub fn zyz(self) -> Vector<3, T, A>

Returns (self.z, self.y, self.z).

Source

pub fn zzx(self) -> Vector<3, T, A>

Returns (self.z, self.z, self.x).

Source

pub fn zzy(self) -> Vector<3, T, A>

Returns (self.z, self.z, self.y).

Source

pub fn zzz(self) -> Vector<3, T, A>

Returns (self.z, self.z, self.z).

Source

pub fn xxxx(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.x, self.x).

Source

pub fn xxxy(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.x, self.y).

Source

pub fn xxxz(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.x, self.z).

Source

pub fn xxyx(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.y, self.x).

Source

pub fn xxyy(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.y, self.y).

Source

pub fn xxyz(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.y, self.z).

Source

pub fn xxzx(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.z, self.x).

Source

pub fn xxzy(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.z, self.y).

Source

pub fn xxzz(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.z, self.z).

Source

pub fn xyxx(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.x, self.x).

Source

pub fn xyxy(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.x, self.y).

Source

pub fn xyxz(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.x, self.z).

Source

pub fn xyyx(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.y, self.x).

Source

pub fn xyyy(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.y, self.y).

Source

pub fn xyyz(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.y, self.z).

Source

pub fn xyzx(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.z, self.x).

Source

pub fn xyzy(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.z, self.y).

Source

pub fn xyzz(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.z, self.z).

Source

pub fn xzxx(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.x, self.x).

Source

pub fn xzxy(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.x, self.y).

Source

pub fn xzxz(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.x, self.z).

Source

pub fn xzyx(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.y, self.x).

Source

pub fn xzyy(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.y, self.y).

Source

pub fn xzyz(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.y, self.z).

Source

pub fn xzzx(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.z, self.x).

Source

pub fn xzzy(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.z, self.y).

Source

pub fn xzzz(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.z, self.z).

Source

pub fn yxxx(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.x, self.x).

Source

pub fn yxxy(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.x, self.y).

Source

pub fn yxxz(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.x, self.z).

Source

pub fn yxyx(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.y, self.x).

Source

pub fn yxyy(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.y, self.y).

Source

pub fn yxyz(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.y, self.z).

Source

pub fn yxzx(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.z, self.x).

Source

pub fn yxzy(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.z, self.y).

Source

pub fn yxzz(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.z, self.z).

Source

pub fn yyxx(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.x, self.x).

Source

pub fn yyxy(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.x, self.y).

Source

pub fn yyxz(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.x, self.z).

Source

pub fn yyyx(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.y, self.x).

Source

pub fn yyyy(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.y, self.y).

Source

pub fn yyyz(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.y, self.z).

Source

pub fn yyzx(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.z, self.x).

Source

pub fn yyzy(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.z, self.y).

Source

pub fn yyzz(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.z, self.z).

Source

pub fn yzxx(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.x, self.x).

Source

pub fn yzxy(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.x, self.y).

Source

pub fn yzxz(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.x, self.z).

Source

pub fn yzyx(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.y, self.x).

Source

pub fn yzyy(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.y, self.y).

Source

pub fn yzyz(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.y, self.z).

Source

pub fn yzzx(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.z, self.x).

Source

pub fn yzzy(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.z, self.y).

Source

pub fn yzzz(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.z, self.z).

Source

pub fn zxxx(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.x, self.x).

Source

pub fn zxxy(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.x, self.y).

Source

pub fn zxxz(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.x, self.z).

Source

pub fn zxyx(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.y, self.x).

Source

pub fn zxyy(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.y, self.y).

Source

pub fn zxyz(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.y, self.z).

Source

pub fn zxzx(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.z, self.x).

Source

pub fn zxzy(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.z, self.y).

Source

pub fn zxzz(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.z, self.z).

Source

pub fn zyxx(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.x, self.x).

Source

pub fn zyxy(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.x, self.y).

Source

pub fn zyxz(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.x, self.z).

Source

pub fn zyyx(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.y, self.x).

Source

pub fn zyyy(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.y, self.y).

Source

pub fn zyyz(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.y, self.z).

Source

pub fn zyzx(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.z, self.x).

Source

pub fn zyzy(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.z, self.y).

Source

pub fn zyzz(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.z, self.z).

Source

pub fn zzxx(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.x, self.x).

Source

pub fn zzxy(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.x, self.y).

Source

pub fn zzxz(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.x, self.z).

Source

pub fn zzyx(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.y, self.x).

Source

pub fn zzyy(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.y, self.y).

Source

pub fn zzyz(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.y, self.z).

Source

pub fn zzzx(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.z, self.x).

Source

pub fn zzzy(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.z, self.y).

Source

pub fn zzzz(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.z, self.z).

Source

pub fn with_x(self, value: T) -> Self

Returns the vector with the x component set to the given value.

Source

pub fn with_y(self, value: T) -> Self

Returns the vector with the y component set to the given value.

Source

pub fn with_z(self, value: T) -> Self

Returns the vector with the z component set to the given value.

Source

pub fn with_xy(self, value: Vector<2, T, A>) -> Self

Returns the vector with the x and y components set to the given values.

Source

pub fn with_xz(self, value: Vector<2, T, A>) -> Self

Returns the vector with the x and z components set to the given values.

Source

pub fn with_yx(self, value: Vector<2, T, A>) -> Self

Returns the vector with the y and x components set to the given values.

Source

pub fn with_yz(self, value: Vector<2, T, A>) -> Self

Returns the vector with the y and z components set to the given values.

Source

pub fn with_zx(self, value: Vector<2, T, A>) -> Self

Returns the vector with the z and x components set to the given values.

Source

pub fn with_zy(self, value: Vector<2, T, A>) -> Self

Returns the vector with the z and y components set to the given values.

Source

pub fn with_xyz(self, value: Vector<3, T, A>) -> Self

Returns the vector with the x, y and z components set to the given values.

Source

pub fn with_xzy(self, value: Vector<3, T, A>) -> Self

Returns the vector with the x, z and y components set to the given values.

Source

pub fn with_yxz(self, value: Vector<3, T, A>) -> Self

Returns the vector with the y, x and z components set to the given values.

Source

pub fn with_yzx(self, value: Vector<3, T, A>) -> Self

Returns the vector with the y, z and x components set to the given values.

Source

pub fn with_zxy(self, value: Vector<3, T, A>) -> Self

Returns the vector with the z, x and y components set to the given values.

Source

pub fn with_zyx(self, value: Vector<3, T, A>) -> Self

Returns the vector with the z, y and x components set to the given values.

Source§

impl<T, A: Alignment> Vector<4, T, A>
where T: Scalar,

Source

pub fn xx(self) -> Vector<2, T, A>

Returns (self.x, self.x).

Source

pub fn xy(self) -> Vector<2, T, A>

Returns (self.x, self.y).

Source

pub fn xz(self) -> Vector<2, T, A>

Returns (self.x, self.z).

Source

pub fn xw(self) -> Vector<2, T, A>

Returns (self.x, self.w).

Source

pub fn yx(self) -> Vector<2, T, A>

Returns (self.y, self.x).

Source

pub fn yy(self) -> Vector<2, T, A>

Returns (self.y, self.y).

Source

pub fn yz(self) -> Vector<2, T, A>

Returns (self.y, self.z).

Source

pub fn yw(self) -> Vector<2, T, A>

Returns (self.y, self.w).

Source

pub fn zx(self) -> Vector<2, T, A>

Returns (self.z, self.x).

Source

pub fn zy(self) -> Vector<2, T, A>

Returns (self.z, self.y).

Source

pub fn zz(self) -> Vector<2, T, A>

Returns (self.z, self.z).

Source

pub fn zw(self) -> Vector<2, T, A>

Returns (self.z, self.w).

Source

pub fn wx(self) -> Vector<2, T, A>

Returns (self.w, self.x).

Source

pub fn wy(self) -> Vector<2, T, A>

Returns (self.w, self.y).

Source

pub fn wz(self) -> Vector<2, T, A>

Returns (self.w, self.z).

Source

pub fn ww(self) -> Vector<2, T, A>

Returns (self.w, self.w).

Source

pub fn xxx(self) -> Vector<3, T, A>

Returns (self.x, self.x, self.x).

Source

pub fn xxy(self) -> Vector<3, T, A>

Returns (self.x, self.x, self.y).

Source

pub fn xxz(self) -> Vector<3, T, A>

Returns (self.x, self.x, self.z).

Source

pub fn xxw(self) -> Vector<3, T, A>

Returns (self.x, self.x, self.w).

Source

pub fn xyx(self) -> Vector<3, T, A>

Returns (self.x, self.y, self.x).

Source

pub fn xyy(self) -> Vector<3, T, A>

Returns (self.x, self.y, self.y).

Source

pub fn xyz(self) -> Vector<3, T, A>

Returns (self.x, self.y, self.z).

Source

pub fn xyw(self) -> Vector<3, T, A>

Returns (self.x, self.y, self.w).

Source

pub fn xzx(self) -> Vector<3, T, A>

Returns (self.x, self.z, self.x).

Source

pub fn xzy(self) -> Vector<3, T, A>

Returns (self.x, self.z, self.y).

Source

pub fn xzz(self) -> Vector<3, T, A>

Returns (self.x, self.z, self.z).

Source

pub fn xzw(self) -> Vector<3, T, A>

Returns (self.x, self.z, self.w).

Source

pub fn xwx(self) -> Vector<3, T, A>

Returns (self.x, self.w, self.x).

Source

pub fn xwy(self) -> Vector<3, T, A>

Returns (self.x, self.w, self.y).

Source

pub fn xwz(self) -> Vector<3, T, A>

Returns (self.x, self.w, self.z).

Source

pub fn xww(self) -> Vector<3, T, A>

Returns (self.x, self.w, self.w).

Source

pub fn yxx(self) -> Vector<3, T, A>

Returns (self.y, self.x, self.x).

Source

pub fn yxy(self) -> Vector<3, T, A>

Returns (self.y, self.x, self.y).

Source

pub fn yxz(self) -> Vector<3, T, A>

Returns (self.y, self.x, self.z).

Source

pub fn yxw(self) -> Vector<3, T, A>

Returns (self.y, self.x, self.w).

Source

pub fn yyx(self) -> Vector<3, T, A>

Returns (self.y, self.y, self.x).

Source

pub fn yyy(self) -> Vector<3, T, A>

Returns (self.y, self.y, self.y).

Source

pub fn yyz(self) -> Vector<3, T, A>

Returns (self.y, self.y, self.z).

Source

pub fn yyw(self) -> Vector<3, T, A>

Returns (self.y, self.y, self.w).

Source

pub fn yzx(self) -> Vector<3, T, A>

Returns (self.y, self.z, self.x).

Source

pub fn yzy(self) -> Vector<3, T, A>

Returns (self.y, self.z, self.y).

Source

pub fn yzz(self) -> Vector<3, T, A>

Returns (self.y, self.z, self.z).

Source

pub fn yzw(self) -> Vector<3, T, A>

Returns (self.y, self.z, self.w).

Source

pub fn ywx(self) -> Vector<3, T, A>

Returns (self.y, self.w, self.x).

Source

pub fn ywy(self) -> Vector<3, T, A>

Returns (self.y, self.w, self.y).

Source

pub fn ywz(self) -> Vector<3, T, A>

Returns (self.y, self.w, self.z).

Source

pub fn yww(self) -> Vector<3, T, A>

Returns (self.y, self.w, self.w).

Source

pub fn zxx(self) -> Vector<3, T, A>

Returns (self.z, self.x, self.x).

Source

pub fn zxy(self) -> Vector<3, T, A>

Returns (self.z, self.x, self.y).

Source

pub fn zxz(self) -> Vector<3, T, A>

Returns (self.z, self.x, self.z).

Source

pub fn zxw(self) -> Vector<3, T, A>

Returns (self.z, self.x, self.w).

Source

pub fn zyx(self) -> Vector<3, T, A>

Returns (self.z, self.y, self.x).

Source

pub fn zyy(self) -> Vector<3, T, A>

Returns (self.z, self.y, self.y).

Source

pub fn zyz(self) -> Vector<3, T, A>

Returns (self.z, self.y, self.z).

Source

pub fn zyw(self) -> Vector<3, T, A>

Returns (self.z, self.y, self.w).

Source

pub fn zzx(self) -> Vector<3, T, A>

Returns (self.z, self.z, self.x).

Source

pub fn zzy(self) -> Vector<3, T, A>

Returns (self.z, self.z, self.y).

Source

pub fn zzz(self) -> Vector<3, T, A>

Returns (self.z, self.z, self.z).

Source

pub fn zzw(self) -> Vector<3, T, A>

Returns (self.z, self.z, self.w).

Source

pub fn zwx(self) -> Vector<3, T, A>

Returns (self.z, self.w, self.x).

Source

pub fn zwy(self) -> Vector<3, T, A>

Returns (self.z, self.w, self.y).

Source

pub fn zwz(self) -> Vector<3, T, A>

Returns (self.z, self.w, self.z).

Source

pub fn zww(self) -> Vector<3, T, A>

Returns (self.z, self.w, self.w).

Source

pub fn wxx(self) -> Vector<3, T, A>

Returns (self.w, self.x, self.x).

Source

pub fn wxy(self) -> Vector<3, T, A>

Returns (self.w, self.x, self.y).

Source

pub fn wxz(self) -> Vector<3, T, A>

Returns (self.w, self.x, self.z).

Source

pub fn wxw(self) -> Vector<3, T, A>

Returns (self.w, self.x, self.w).

Source

pub fn wyx(self) -> Vector<3, T, A>

Returns (self.w, self.y, self.x).

Source

pub fn wyy(self) -> Vector<3, T, A>

Returns (self.w, self.y, self.y).

Source

pub fn wyz(self) -> Vector<3, T, A>

Returns (self.w, self.y, self.z).

Source

pub fn wyw(self) -> Vector<3, T, A>

Returns (self.w, self.y, self.w).

Source

pub fn wzx(self) -> Vector<3, T, A>

Returns (self.w, self.z, self.x).

Source

pub fn wzy(self) -> Vector<3, T, A>

Returns (self.w, self.z, self.y).

Source

pub fn wzz(self) -> Vector<3, T, A>

Returns (self.w, self.z, self.z).

Source

pub fn wzw(self) -> Vector<3, T, A>

Returns (self.w, self.z, self.w).

Source

pub fn wwx(self) -> Vector<3, T, A>

Returns (self.w, self.w, self.x).

Source

pub fn wwy(self) -> Vector<3, T, A>

Returns (self.w, self.w, self.y).

Source

pub fn wwz(self) -> Vector<3, T, A>

Returns (self.w, self.w, self.z).

Source

pub fn www(self) -> Vector<3, T, A>

Returns (self.w, self.w, self.w).

Source

pub fn xxxx(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.x, self.x).

Source

pub fn xxxy(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.x, self.y).

Source

pub fn xxxz(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.x, self.z).

Source

pub fn xxxw(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.x, self.w).

Source

pub fn xxyx(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.y, self.x).

Source

pub fn xxyy(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.y, self.y).

Source

pub fn xxyz(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.y, self.z).

Source

pub fn xxyw(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.y, self.w).

Source

pub fn xxzx(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.z, self.x).

Source

pub fn xxzy(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.z, self.y).

Source

pub fn xxzz(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.z, self.z).

Source

pub fn xxzw(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.z, self.w).

Source

pub fn xxwx(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.w, self.x).

Source

pub fn xxwy(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.w, self.y).

Source

pub fn xxwz(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.w, self.z).

Source

pub fn xxww(self) -> Vector<4, T, A>

Returns (self.x, self.x, self.w, self.w).

Source

pub fn xyxx(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.x, self.x).

Source

pub fn xyxy(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.x, self.y).

Source

pub fn xyxz(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.x, self.z).

Source

pub fn xyxw(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.x, self.w).

Source

pub fn xyyx(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.y, self.x).

Source

pub fn xyyy(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.y, self.y).

Source

pub fn xyyz(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.y, self.z).

Source

pub fn xyyw(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.y, self.w).

Source

pub fn xyzx(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.z, self.x).

Source

pub fn xyzy(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.z, self.y).

Source

pub fn xyzz(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.z, self.z).

Source

pub fn xyzw(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.z, self.w).

Source

pub fn xywx(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.w, self.x).

Source

pub fn xywy(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.w, self.y).

Source

pub fn xywz(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.w, self.z).

Source

pub fn xyww(self) -> Vector<4, T, A>

Returns (self.x, self.y, self.w, self.w).

Source

pub fn xzxx(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.x, self.x).

Source

pub fn xzxy(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.x, self.y).

Source

pub fn xzxz(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.x, self.z).

Source

pub fn xzxw(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.x, self.w).

Source

pub fn xzyx(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.y, self.x).

Source

pub fn xzyy(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.y, self.y).

Source

pub fn xzyz(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.y, self.z).

Source

pub fn xzyw(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.y, self.w).

Source

pub fn xzzx(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.z, self.x).

Source

pub fn xzzy(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.z, self.y).

Source

pub fn xzzz(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.z, self.z).

Source

pub fn xzzw(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.z, self.w).

Source

pub fn xzwx(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.w, self.x).

Source

pub fn xzwy(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.w, self.y).

Source

pub fn xzwz(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.w, self.z).

Source

pub fn xzww(self) -> Vector<4, T, A>

Returns (self.x, self.z, self.w, self.w).

Source

pub fn xwxx(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.x, self.x).

Source

pub fn xwxy(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.x, self.y).

Source

pub fn xwxz(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.x, self.z).

Source

pub fn xwxw(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.x, self.w).

Source

pub fn xwyx(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.y, self.x).

Source

pub fn xwyy(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.y, self.y).

Source

pub fn xwyz(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.y, self.z).

Source

pub fn xwyw(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.y, self.w).

Source

pub fn xwzx(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.z, self.x).

Source

pub fn xwzy(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.z, self.y).

Source

pub fn xwzz(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.z, self.z).

Source

pub fn xwzw(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.z, self.w).

Source

pub fn xwwx(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.w, self.x).

Source

pub fn xwwy(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.w, self.y).

Source

pub fn xwwz(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.w, self.z).

Source

pub fn xwww(self) -> Vector<4, T, A>

Returns (self.x, self.w, self.w, self.w).

Source

pub fn yxxx(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.x, self.x).

Source

pub fn yxxy(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.x, self.y).

Source

pub fn yxxz(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.x, self.z).

Source

pub fn yxxw(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.x, self.w).

Source

pub fn yxyx(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.y, self.x).

Source

pub fn yxyy(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.y, self.y).

Source

pub fn yxyz(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.y, self.z).

Source

pub fn yxyw(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.y, self.w).

Source

pub fn yxzx(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.z, self.x).

Source

pub fn yxzy(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.z, self.y).

Source

pub fn yxzz(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.z, self.z).

Source

pub fn yxzw(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.z, self.w).

Source

pub fn yxwx(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.w, self.x).

Source

pub fn yxwy(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.w, self.y).

Source

pub fn yxwz(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.w, self.z).

Source

pub fn yxww(self) -> Vector<4, T, A>

Returns (self.y, self.x, self.w, self.w).

Source

pub fn yyxx(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.x, self.x).

Source

pub fn yyxy(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.x, self.y).

Source

pub fn yyxz(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.x, self.z).

Source

pub fn yyxw(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.x, self.w).

Source

pub fn yyyx(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.y, self.x).

Source

pub fn yyyy(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.y, self.y).

Source

pub fn yyyz(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.y, self.z).

Source

pub fn yyyw(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.y, self.w).

Source

pub fn yyzx(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.z, self.x).

Source

pub fn yyzy(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.z, self.y).

Source

pub fn yyzz(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.z, self.z).

Source

pub fn yyzw(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.z, self.w).

Source

pub fn yywx(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.w, self.x).

Source

pub fn yywy(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.w, self.y).

Source

pub fn yywz(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.w, self.z).

Source

pub fn yyww(self) -> Vector<4, T, A>

Returns (self.y, self.y, self.w, self.w).

Source

pub fn yzxx(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.x, self.x).

Source

pub fn yzxy(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.x, self.y).

Source

pub fn yzxz(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.x, self.z).

Source

pub fn yzxw(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.x, self.w).

Source

pub fn yzyx(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.y, self.x).

Source

pub fn yzyy(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.y, self.y).

Source

pub fn yzyz(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.y, self.z).

Source

pub fn yzyw(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.y, self.w).

Source

pub fn yzzx(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.z, self.x).

Source

pub fn yzzy(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.z, self.y).

Source

pub fn yzzz(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.z, self.z).

Source

pub fn yzzw(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.z, self.w).

Source

pub fn yzwx(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.w, self.x).

Source

pub fn yzwy(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.w, self.y).

Source

pub fn yzwz(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.w, self.z).

Source

pub fn yzww(self) -> Vector<4, T, A>

Returns (self.y, self.z, self.w, self.w).

Source

pub fn ywxx(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.x, self.x).

Source

pub fn ywxy(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.x, self.y).

Source

pub fn ywxz(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.x, self.z).

Source

pub fn ywxw(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.x, self.w).

Source

pub fn ywyx(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.y, self.x).

Source

pub fn ywyy(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.y, self.y).

Source

pub fn ywyz(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.y, self.z).

Source

pub fn ywyw(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.y, self.w).

Source

pub fn ywzx(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.z, self.x).

Source

pub fn ywzy(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.z, self.y).

Source

pub fn ywzz(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.z, self.z).

Source

pub fn ywzw(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.z, self.w).

Source

pub fn ywwx(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.w, self.x).

Source

pub fn ywwy(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.w, self.y).

Source

pub fn ywwz(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.w, self.z).

Source

pub fn ywww(self) -> Vector<4, T, A>

Returns (self.y, self.w, self.w, self.w).

Source

pub fn zxxx(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.x, self.x).

Source

pub fn zxxy(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.x, self.y).

Source

pub fn zxxz(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.x, self.z).

Source

pub fn zxxw(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.x, self.w).

Source

pub fn zxyx(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.y, self.x).

Source

pub fn zxyy(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.y, self.y).

Source

pub fn zxyz(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.y, self.z).

Source

pub fn zxyw(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.y, self.w).

Source

pub fn zxzx(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.z, self.x).

Source

pub fn zxzy(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.z, self.y).

Source

pub fn zxzz(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.z, self.z).

Source

pub fn zxzw(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.z, self.w).

Source

pub fn zxwx(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.w, self.x).

Source

pub fn zxwy(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.w, self.y).

Source

pub fn zxwz(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.w, self.z).

Source

pub fn zxww(self) -> Vector<4, T, A>

Returns (self.z, self.x, self.w, self.w).

Source

pub fn zyxx(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.x, self.x).

Source

pub fn zyxy(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.x, self.y).

Source

pub fn zyxz(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.x, self.z).

Source

pub fn zyxw(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.x, self.w).

Source

pub fn zyyx(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.y, self.x).

Source

pub fn zyyy(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.y, self.y).

Source

pub fn zyyz(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.y, self.z).

Source

pub fn zyyw(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.y, self.w).

Source

pub fn zyzx(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.z, self.x).

Source

pub fn zyzy(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.z, self.y).

Source

pub fn zyzz(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.z, self.z).

Source

pub fn zyzw(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.z, self.w).

Source

pub fn zywx(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.w, self.x).

Source

pub fn zywy(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.w, self.y).

Source

pub fn zywz(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.w, self.z).

Source

pub fn zyww(self) -> Vector<4, T, A>

Returns (self.z, self.y, self.w, self.w).

Source

pub fn zzxx(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.x, self.x).

Source

pub fn zzxy(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.x, self.y).

Source

pub fn zzxz(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.x, self.z).

Source

pub fn zzxw(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.x, self.w).

Source

pub fn zzyx(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.y, self.x).

Source

pub fn zzyy(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.y, self.y).

Source

pub fn zzyz(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.y, self.z).

Source

pub fn zzyw(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.y, self.w).

Source

pub fn zzzx(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.z, self.x).

Source

pub fn zzzy(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.z, self.y).

Source

pub fn zzzz(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.z, self.z).

Source

pub fn zzzw(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.z, self.w).

Source

pub fn zzwx(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.w, self.x).

Source

pub fn zzwy(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.w, self.y).

Source

pub fn zzwz(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.w, self.z).

Source

pub fn zzww(self) -> Vector<4, T, A>

Returns (self.z, self.z, self.w, self.w).

Source

pub fn zwxx(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.x, self.x).

Source

pub fn zwxy(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.x, self.y).

Source

pub fn zwxz(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.x, self.z).

Source

pub fn zwxw(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.x, self.w).

Source

pub fn zwyx(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.y, self.x).

Source

pub fn zwyy(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.y, self.y).

Source

pub fn zwyz(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.y, self.z).

Source

pub fn zwyw(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.y, self.w).

Source

pub fn zwzx(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.z, self.x).

Source

pub fn zwzy(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.z, self.y).

Source

pub fn zwzz(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.z, self.z).

Source

pub fn zwzw(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.z, self.w).

Source

pub fn zwwx(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.w, self.x).

Source

pub fn zwwy(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.w, self.y).

Source

pub fn zwwz(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.w, self.z).

Source

pub fn zwww(self) -> Vector<4, T, A>

Returns (self.z, self.w, self.w, self.w).

Source

pub fn wxxx(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.x, self.x).

Source

pub fn wxxy(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.x, self.y).

Source

pub fn wxxz(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.x, self.z).

Source

pub fn wxxw(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.x, self.w).

Source

pub fn wxyx(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.y, self.x).

Source

pub fn wxyy(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.y, self.y).

Source

pub fn wxyz(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.y, self.z).

Source

pub fn wxyw(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.y, self.w).

Source

pub fn wxzx(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.z, self.x).

Source

pub fn wxzy(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.z, self.y).

Source

pub fn wxzz(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.z, self.z).

Source

pub fn wxzw(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.z, self.w).

Source

pub fn wxwx(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.w, self.x).

Source

pub fn wxwy(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.w, self.y).

Source

pub fn wxwz(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.w, self.z).

Source

pub fn wxww(self) -> Vector<4, T, A>

Returns (self.w, self.x, self.w, self.w).

Source

pub fn wyxx(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.x, self.x).

Source

pub fn wyxy(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.x, self.y).

Source

pub fn wyxz(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.x, self.z).

Source

pub fn wyxw(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.x, self.w).

Source

pub fn wyyx(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.y, self.x).

Source

pub fn wyyy(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.y, self.y).

Source

pub fn wyyz(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.y, self.z).

Source

pub fn wyyw(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.y, self.w).

Source

pub fn wyzx(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.z, self.x).

Source

pub fn wyzy(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.z, self.y).

Source

pub fn wyzz(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.z, self.z).

Source

pub fn wyzw(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.z, self.w).

Source

pub fn wywx(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.w, self.x).

Source

pub fn wywy(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.w, self.y).

Source

pub fn wywz(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.w, self.z).

Source

pub fn wyww(self) -> Vector<4, T, A>

Returns (self.w, self.y, self.w, self.w).

Source

pub fn wzxx(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.x, self.x).

Source

pub fn wzxy(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.x, self.y).

Source

pub fn wzxz(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.x, self.z).

Source

pub fn wzxw(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.x, self.w).

Source

pub fn wzyx(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.y, self.x).

Source

pub fn wzyy(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.y, self.y).

Source

pub fn wzyz(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.y, self.z).

Source

pub fn wzyw(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.y, self.w).

Source

pub fn wzzx(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.z, self.x).

Source

pub fn wzzy(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.z, self.y).

Source

pub fn wzzz(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.z, self.z).

Source

pub fn wzzw(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.z, self.w).

Source

pub fn wzwx(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.w, self.x).

Source

pub fn wzwy(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.w, self.y).

Source

pub fn wzwz(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.w, self.z).

Source

pub fn wzww(self) -> Vector<4, T, A>

Returns (self.w, self.z, self.w, self.w).

Source

pub fn wwxx(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.x, self.x).

Source

pub fn wwxy(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.x, self.y).

Source

pub fn wwxz(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.x, self.z).

Source

pub fn wwxw(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.x, self.w).

Source

pub fn wwyx(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.y, self.x).

Source

pub fn wwyy(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.y, self.y).

Source

pub fn wwyz(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.y, self.z).

Source

pub fn wwyw(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.y, self.w).

Source

pub fn wwzx(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.z, self.x).

Source

pub fn wwzy(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.z, self.y).

Source

pub fn wwzz(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.z, self.z).

Source

pub fn wwzw(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.z, self.w).

Source

pub fn wwwx(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.w, self.x).

Source

pub fn wwwy(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.w, self.y).

Source

pub fn wwwz(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.w, self.z).

Source

pub fn wwww(self) -> Vector<4, T, A>

Returns (self.w, self.w, self.w, self.w).

Source

pub fn with_x(self, value: T) -> Self

Returns the vector with the x component set to the given value.

Source

pub fn with_y(self, value: T) -> Self

Returns the vector with the y component set to the given value.

Source

pub fn with_z(self, value: T) -> Self

Returns the vector with the z component set to the given value.

Source

pub fn with_w(self, value: T) -> Self

Returns the vector with the w component set to the given value.

Source

pub fn with_xy(self, value: Vector<2, T, A>) -> Self

Returns the vector with the x and y components set to the given values.

Source

pub fn with_xz(self, value: Vector<2, T, A>) -> Self

Returns the vector with the x and z components set to the given values.

Source

pub fn with_xw(self, value: Vector<2, T, A>) -> Self

Returns the vector with the x and w components set to the given values.

Source

pub fn with_yx(self, value: Vector<2, T, A>) -> Self

Returns the vector with the y and x components set to the given values.

Source

pub fn with_yz(self, value: Vector<2, T, A>) -> Self

Returns the vector with the y and z components set to the given values.

Source

pub fn with_yw(self, value: Vector<2, T, A>) -> Self

Returns the vector with the y and w components set to the given values.

Source

pub fn with_zx(self, value: Vector<2, T, A>) -> Self

Returns the vector with the z and x components set to the given values.

Source

pub fn with_zy(self, value: Vector<2, T, A>) -> Self

Returns the vector with the z and y components set to the given values.

Source

pub fn with_zw(self, value: Vector<2, T, A>) -> Self

Returns the vector with the z and w components set to the given values.

Source

pub fn with_wx(self, value: Vector<2, T, A>) -> Self

Returns the vector with the w and x components set to the given values.

Source

pub fn with_wy(self, value: Vector<2, T, A>) -> Self

Returns the vector with the w and y components set to the given values.

Source

pub fn with_wz(self, value: Vector<2, T, A>) -> Self

Returns the vector with the w and z components set to the given values.

Source

pub fn with_xyz(self, value: Vector<3, T, A>) -> Self

Returns the vector with the x, y and z components set to the given values.

Source

pub fn with_xyw(self, value: Vector<3, T, A>) -> Self

Returns the vector with the x, y and w components set to the given values.

Source

pub fn with_xzy(self, value: Vector<3, T, A>) -> Self

Returns the vector with the x, z and y components set to the given values.

Source

pub fn with_xzw(self, value: Vector<3, T, A>) -> Self

Returns the vector with the x, z and w components set to the given values.

Source

pub fn with_xwy(self, value: Vector<3, T, A>) -> Self

Returns the vector with the x, w and y components set to the given values.

Source

pub fn with_xwz(self, value: Vector<3, T, A>) -> Self

Returns the vector with the x, w and z components set to the given values.

Source

pub fn with_yxz(self, value: Vector<3, T, A>) -> Self

Returns the vector with the y, x and z components set to the given values.

Source

pub fn with_yxw(self, value: Vector<3, T, A>) -> Self

Returns the vector with the y, x and w components set to the given values.

Source

pub fn with_yzx(self, value: Vector<3, T, A>) -> Self

Returns the vector with the y, z and x components set to the given values.

Source

pub fn with_yzw(self, value: Vector<3, T, A>) -> Self

Returns the vector with the y, z and w components set to the given values.

Source

pub fn with_ywx(self, value: Vector<3, T, A>) -> Self

Returns the vector with the y, w and x components set to the given values.

Source

pub fn with_ywz(self, value: Vector<3, T, A>) -> Self

Returns the vector with the y, w and z components set to the given values.

Source

pub fn with_zxy(self, value: Vector<3, T, A>) -> Self

Returns the vector with the z, x and y components set to the given values.

Source

pub fn with_zxw(self, value: Vector<3, T, A>) -> Self

Returns the vector with the z, x and w components set to the given values.

Source

pub fn with_zyx(self, value: Vector<3, T, A>) -> Self

Returns the vector with the z, y and x components set to the given values.

Source

pub fn with_zyw(self, value: Vector<3, T, A>) -> Self

Returns the vector with the z, y and w components set to the given values.

Source

pub fn with_zwx(self, value: Vector<3, T, A>) -> Self

Returns the vector with the z, w and x components set to the given values.

Source

pub fn with_zwy(self, value: Vector<3, T, A>) -> Self

Returns the vector with the z, w and y components set to the given values.

Source

pub fn with_wxy(self, value: Vector<3, T, A>) -> Self

Returns the vector with the w, x and y components set to the given values.

Source

pub fn with_wxz(self, value: Vector<3, T, A>) -> Self

Returns the vector with the w, x and z components set to the given values.

Source

pub fn with_wyx(self, value: Vector<3, T, A>) -> Self

Returns the vector with the w, y and x components set to the given values.

Source

pub fn with_wyz(self, value: Vector<3, T, A>) -> Self

Returns the vector with the w, y and z components set to the given values.

Source

pub fn with_wzx(self, value: Vector<3, T, A>) -> Self

Returns the vector with the w, z and x components set to the given values.

Source

pub fn with_wzy(self, value: Vector<3, T, A>) -> Self

Returns the vector with the w, z and y components set to the given values.

Source

pub fn with_xyzw(self, value: Vector<4, T, A>) -> Self

Returns the vector with the x, y, z and w components set to the given values.

Source

pub fn with_xywz(self, value: Vector<4, T, A>) -> Self

Returns the vector with the x, y, w and z components set to the given values.

Source

pub fn with_xzyw(self, value: Vector<4, T, A>) -> Self

Returns the vector with the x, z, y and w components set to the given values.

Source

pub fn with_xzwy(self, value: Vector<4, T, A>) -> Self

Returns the vector with the x, z, w and y components set to the given values.

Source

pub fn with_xwyz(self, value: Vector<4, T, A>) -> Self

Returns the vector with the x, w, y and z components set to the given values.

Source

pub fn with_xwzy(self, value: Vector<4, T, A>) -> Self

Returns the vector with the x, w, z and y components set to the given values.

Source

pub fn with_yxzw(self, value: Vector<4, T, A>) -> Self

Returns the vector with the y, x, z and w components set to the given values.

Source

pub fn with_yxwz(self, value: Vector<4, T, A>) -> Self

Returns the vector with the y, x, w and z components set to the given values.

Source

pub fn with_yzxw(self, value: Vector<4, T, A>) -> Self

Returns the vector with the y, z, x and w components set to the given values.

Source

pub fn with_yzwx(self, value: Vector<4, T, A>) -> Self

Returns the vector with the y, z, w and x components set to the given values.

Source

pub fn with_ywxz(self, value: Vector<4, T, A>) -> Self

Returns the vector with the y, w, x and z components set to the given values.

Source

pub fn with_ywzx(self, value: Vector<4, T, A>) -> Self

Returns the vector with the y, w, z and x components set to the given values.

Source

pub fn with_zxyw(self, value: Vector<4, T, A>) -> Self

Returns the vector with the z, x, y and w components set to the given values.

Source

pub fn with_zxwy(self, value: Vector<4, T, A>) -> Self

Returns the vector with the z, x, w and y components set to the given values.

Source

pub fn with_zyxw(self, value: Vector<4, T, A>) -> Self

Returns the vector with the z, y, x and w components set to the given values.

Source

pub fn with_zywx(self, value: Vector<4, T, A>) -> Self

Returns the vector with the z, y, w and x components set to the given values.

Source

pub fn with_zwxy(self, value: Vector<4, T, A>) -> Self

Returns the vector with the z, w, x and y components set to the given values.

Source

pub fn with_zwyx(self, value: Vector<4, T, A>) -> Self

Returns the vector with the z, w, y and x components set to the given values.

Source

pub fn with_wxyz(self, value: Vector<4, T, A>) -> Self

Returns the vector with the w, x, y and z components set to the given values.

Source

pub fn with_wxzy(self, value: Vector<4, T, A>) -> Self

Returns the vector with the w, x, z and y components set to the given values.

Source

pub fn with_wyxz(self, value: Vector<4, T, A>) -> Self

Returns the vector with the w, y, x and z components set to the given values.

Source

pub fn with_wyzx(self, value: Vector<4, T, A>) -> Self

Returns the vector with the w, y, z and x components set to the given values.

Source

pub fn with_wzxy(self, value: Vector<4, T, A>) -> Self

Returns the vector with the w, z, x and y components set to the given values.

Source

pub fn with_wzyx(self, value: Vector<4, T, A>) -> Self

Returns the vector with the w, z, y and x components set to the given values.

Trait Implementations§

Source§

impl<const N: usize, T, A: Alignment> Add<T> for Vector<N, T, A>
where T: Scalar + Add<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Add for Vector<N, T, A>
where T: Scalar + Add<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<const N: usize, T, A: Alignment> AddAssign<T> for Vector<N, T, A>
where T: Scalar + Add<Output = T>, Length<N>: SupportedLength,

Source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
Source§

impl<const N: usize, T, A: Alignment> AddAssign for Vector<N, T, A>
where T: Scalar + Add<Output = T>, Length<N>: SupportedLength,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitAnd<T> for Vector<N, T, A>
where T: Scalar + BitAnd<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitAnd for Vector<N, T, A>
where T: Scalar + BitAnd<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitAndAssign<T> for Vector<N, T, A>
where T: Scalar + BitAnd<Output = T>, Length<N>: SupportedLength,

Source§

fn bitand_assign(&mut self, rhs: T)

Performs the &= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitAndAssign for Vector<N, T, A>
where T: Scalar + BitAnd<Output = T>, Length<N>: SupportedLength,

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitOr<T> for Vector<N, T, A>
where T: Scalar + BitOr<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitOr for Vector<N, T, A>
where T: Scalar + BitOr<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitOrAssign<T> for Vector<N, T, A>
where T: Scalar + BitOr<Output = T>, Length<N>: SupportedLength,

Source§

fn bitor_assign(&mut self, rhs: T)

Performs the |= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitOrAssign for Vector<N, T, A>
where T: Scalar + BitOr<Output = T>, Length<N>: SupportedLength,

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitXor<T> for Vector<N, T, A>
where T: Scalar + BitXor<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: T) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitXor for Vector<N, T, A>
where T: Scalar + BitXor<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitXorAssign<T> for Vector<N, T, A>
where T: Scalar + BitXor<Output = T>, Length<N>: SupportedLength,

Source§

fn bitxor_assign(&mut self, rhs: T)

Performs the ^= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> BitXorAssign for Vector<N, T, A>
where T: Scalar + BitXor<Output = T>, Length<N>: SupportedLength,

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Clone for Vector<N, T, A>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const N: usize, T, A: Alignment> Debug for Vector<N, T, A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const N: usize, T, A: Alignment> Default for Vector<N, T, A>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T, A: Alignment> Deref for Vector<2, T, A>
where T: Scalar,

Source§

type Target = Xy<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T, A: Alignment> Deref for Vector<3, T, A>
where T: Scalar,

Source§

type Target = Xyz<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T, A: Alignment> Deref for Vector<4, T, A>
where T: Scalar,

Source§

type Target = Xyzw<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T, A: Alignment> DerefMut for Vector<2, T, A>
where T: Scalar,

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<T, A: Alignment> DerefMut for Vector<3, T, A>
where T: Scalar,

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<T, A: Alignment> DerefMut for Vector<4, T, A>
where T: Scalar,

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<const N: usize, T, A: Alignment> Display for Vector<N, T, A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const N: usize, T, A: Alignment> Div<T> for Vector<N, T, A>
where T: Scalar + Div<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Div for Vector<N, T, A>
where T: Scalar + Div<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<const N: usize, T, A: Alignment> DivAssign<T> for Vector<N, T, A>
where T: Scalar + Div<Output = T>, Length<N>: SupportedLength,

Source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> DivAssign for Vector<N, T, A>
where T: Scalar + Div<Output = T>, Length<N>: SupportedLength,

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<T, A: Alignment> From<(T,)> for Vector<2, T, A>
where T: Scalar,

Source§

fn from(value: (T,)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(T,)> for Vector<3, T, A>
where T: Scalar,

Source§

fn from(value: (T,)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(T,)> for Vector<4, T, A>
where T: Scalar,

Source§

fn from(value: (T,)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(T, T)> for Vector<2, T, A>
where T: Scalar,

Source§

fn from(value: (T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(T, T, T)> for Vector<3, T, A>
where T: Scalar,

Source§

fn from(value: (T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(T, T, T, T)> for Vector<4, T, A>
where T: Scalar,

Source§

fn from(value: (T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(T, T, Vector<2, T, A>)> for Vector<4, T, A>
where T: Scalar,

Source§

fn from(value: (T, T, Vector<2, T, A>)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(T, Vector<2, T, A>)> for Vector<3, T, A>
where T: Scalar,

Source§

fn from(value: (T, Vector<2, T, A>)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(T, Vector<2, T, A>, T)> for Vector<4, T, A>
where T: Scalar,

Source§

fn from(value: (T, Vector<2, T, A>, T)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(T, Vector<3, T, A>)> for Vector<4, T, A>
where T: Scalar,

Source§

fn from(value: (T, Vector<3, T, A>)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(Vector<2, T, A>,)> for Vector<2, T, A>
where T: Scalar,

Source§

fn from(value: (Vector<2, T, A>,)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(Vector<2, T, A>, T)> for Vector<3, T, A>
where T: Scalar,

Source§

fn from(value: (Vector<2, T, A>, T)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(Vector<2, T, A>, T, T)> for Vector<4, T, A>
where T: Scalar,

Source§

fn from(value: (Vector<2, T, A>, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(Vector<2, T, A>, Vector<2, T, A>)> for Vector<4, T, A>
where T: Scalar,

Source§

fn from(value: (Vector<2, T, A>, Vector<2, T, A>)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(Vector<3, T, A>,)> for Vector<3, T, A>
where T: Scalar,

Source§

fn from(value: (Vector<3, T, A>,)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(Vector<3, T, A>, T)> for Vector<4, T, A>
where T: Scalar,

Source§

fn from(value: (Vector<3, T, A>, T)) -> Self

Converts to this type from the input type.
Source§

impl<T, A: Alignment> From<(Vector<4, T, A>,)> for Vector<4, T, A>
where T: Scalar,

Source§

fn from(value: (Vector<4, T, A>,)) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize, T, A: Alignment> Hash for Vector<N, T, A>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<const N: usize, T, A: Alignment> Index<usize> for Vector<N, T, A>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<const N: usize, T, A: Alignment> IndexMut<usize> for Vector<N, T, A>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<const N: usize, T, A: Alignment> IntoIterator for &Vector<N, T, A>

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = <[T; N] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, const N: usize, T, A: Alignment> IntoIterator for &'a mut Vector<N, T, A>

Source§

type Item = &'a mut T

The type of the elements being iterated over.
Source§

type IntoIter = <&'a mut [T; N] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<const N: usize, T, A: Alignment> IntoIterator for Vector<N, T, A>

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = <[T; N] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<const N: usize, T, A: Alignment> Mul<T> for Vector<N, T, A>
where T: Scalar + Mul<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Mul for Vector<N, T, A>
where T: Scalar + Mul<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<const N: usize, T, A: Alignment> MulAssign<T> for Vector<N, T, A>
where T: Scalar + Mul<Output = T>, Length<N>: SupportedLength,

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> MulAssign for Vector<N, T, A>
where T: Scalar + Mul<Output = T>, Length<N>: SupportedLength,

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Neg for Vector<N, T, A>
where T: Scalar + Neg<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Not for Vector<N, T, A>
where T: Scalar + Not<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<const N: usize, T, A: Alignment> PartialEq for Vector<N, T, A>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &Self) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const N: usize, T, A: Alignment> Rem<T> for Vector<N, T, A>
where T: Scalar + Rem<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Rem for Vector<N, T, A>
where T: Scalar + Rem<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<const N: usize, T, A: Alignment> RemAssign<T> for Vector<N, T, A>
where T: Scalar + Rem<Output = T>, Length<N>: SupportedLength,

Source§

fn rem_assign(&mut self, rhs: T)

Performs the %= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> RemAssign for Vector<N, T, A>
where T: Scalar + Rem<Output = T>, Length<N>: SupportedLength,

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Shl<T> for Vector<N, T, A>
where T: Scalar + Shl<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: T) -> Self::Output

Performs the << operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Shl for Vector<N, T, A>
where T: Scalar + Shl<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: Self) -> Self::Output

Performs the << operation. Read more
Source§

impl<const N: usize, T, A: Alignment> ShlAssign<T> for Vector<N, T, A>
where T: Scalar + Shl<Output = T>, Length<N>: SupportedLength,

Source§

fn shl_assign(&mut self, rhs: T)

Performs the <<= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> ShlAssign for Vector<N, T, A>
where T: Scalar + Shl<Output = T>, Length<N>: SupportedLength,

Source§

fn shl_assign(&mut self, rhs: Self)

Performs the <<= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Shr<T> for Vector<N, T, A>
where T: Scalar + Shr<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: T) -> Self::Output

Performs the >> operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Shr for Vector<N, T, A>
where T: Scalar + Shr<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: Self) -> Self::Output

Performs the >> operation. Read more
Source§

impl<const N: usize, T, A: Alignment> ShrAssign<T> for Vector<N, T, A>
where T: Scalar + Shr<Output = T>, Length<N>: SupportedLength,

Source§

fn shr_assign(&mut self, rhs: T)

Performs the >>= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> ShrAssign for Vector<N, T, A>
where T: Scalar + Shr<Output = T>, Length<N>: SupportedLength,

Source§

fn shr_assign(&mut self, rhs: Self)

Performs the >>= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Sub<T> for Vector<N, T, A>
where T: Scalar + Sub<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Sub for Vector<N, T, A>
where T: Scalar + Sub<Output = T>, Length<N>: SupportedLength,

Source§

type Output = Vector<N, T, A>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<const N: usize, T, A: Alignment> SubAssign<T> for Vector<N, T, A>
where T: Scalar + Sub<Output = T>, Length<N>: SupportedLength,

Source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> SubAssign for Vector<N, T, A>
where T: Scalar + Sub<Output = T>, Length<N>: SupportedLength,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<const N: usize, T, A: Alignment> Copy for Vector<N, T, A>

Source§

impl<const N: usize, T, A: Alignment> Eq for Vector<N, T, A>
where T: Scalar + Eq, Length<N>: SupportedLength,

Source§

impl<const N: usize, T, A: Alignment> RefUnwindSafe for Vector<N, T, A>

Source§

impl<const N: usize, T, A: Alignment> Send for Vector<N, T, A>

Source§

impl<const N: usize, T, A: Alignment> Sync for Vector<N, T, A>

Source§

impl<const N: usize, T, A: Alignment> Unpin for Vector<N, T, A>

Source§

impl<const N: usize, T, A: Alignment> UnwindSafe for Vector<N, T, A>

Auto Trait Implementations§

§

impl<const N: usize, T, A> Freeze for Vector<N, T, A>
where <A as Alignment>::Select<<Length<N> as SupportedLength>::Select<<T as ScalarBackend<2, Aligned>>::VectorRepr, <T as ScalarBackend<3, Aligned>>::VectorRepr, <T as ScalarBackend<4, Aligned>>::VectorRepr>, <Length<N> as SupportedLength>::Select<Repr2<T>, Repr3<T>, Repr4<T>>>: Freeze,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.