Module vector

Module vector 

Source
Expand description

Vector related items.

Macros§

declare_vector_aliases
Declares vector type aliases for a custom scalar type.
vec2
Creates a [Simd] vector2 from two elements.
vec3
Creates a [Simd] vector3 from three elements.
vec4
Creates a [Simd] vector4 from four elements.
vec2g
Creates a vector2 from two elements, where type inference determines if it is [Simd] or [NonSimd].
vec2s
Creates a [NonSimd] vector2 from two elements.
vec3g
Creates a vector3 from three elements, where type inference determines if it is [Simd] or [NonSimd].
vec3s
Creates a [NonSimd] vector3 from three elements.
vec4g
Creates a vector4 from four elements, where type inference determines if it is [Simd] or [NonSimd].
vec4s
Creates a [NonSimd] vector4 from four elements.

Structs§

NonSimd
A type that marks a Vector as not SIMD-backed.
Simd
A type that marks a Vector as SIMD-backed.
VecLen
A type that represents the length of a vector, and allows for this pattern:
Vector
A generic vector type.

Traits§

Scalar
A trait for types that can be used as elements in a Vector.
ScalarNegOne
A trait for scalars that have a -1 value.
ScalarOne
A trait for scalars that have a 1 value.
ScalarWrapper
Unsafe trait for scalar types that are direct wrappers around another scalar type.
ScalarZero
A trait for scalars that have a 0 value.
SimdBehaviour
Controls the implementation details of Vector<N, Self, Simd>. For example, f32 implementing SimdBehaviour<4> controls Vector<4, f32, Simd>.
Simdness
A trait that is implemented for Simd and NonSimd.
SupportedVecLen
A trait that marks supported Vector lengths.

Type Aliases§

Vec2
Shorthand for Vector<2, T, Simd>.
Vec3
Shorthand for Vector<3, T, Simd>.
Vec4
Shorthand for Vector<4, T, Simd>.
Vec2S
Shorthand for Vector<2, T, NonSimd> (“s” stands for “scalar”).
Vec3S
Shorthand for Vector<3, T, NonSimd> (“s” stands for “scalar”).
Vec4S
Shorthand for Vector<4, T, NonSimd> (“s” stands for “scalar”).