Module vector

Source
Expand description

Vector things. Indices.

Modules§

arithmetics
General arithmetics for the vector type
array
Conversions from Array type to Vector
exposed
Exposed namespace of the module.
general
General trait implementation for the vector type
orphan
Orphan namespace of the module.
own
Own namespace of the module.
prelude
Prelude to use essentials: use my_module::prelude::*.
vec2
Functionality related to 2D vectors
vec3
Functionality related to 3D vectors
vec4
Functionality related to 4D vectors

Structs§

Vector
A vector structure.

Traits§

Collection
A trait for collections of scalars.
ConstLength
A trait implemented for entities with known length at compile-time.
IterExt
Extension trait for iterators over floating-point numbers.
IterFloat
Extension trait for iterators over floating-point numbers.
VectorIter
Trait to get iterator over elements of a vector. Should be implemented even for scalars.
VectorIterMut
Trait to get iterator over elements of a vector.
VectorIterator
Trait that encapsulates an vector elements iterator with specific characteristics and implemetning CloneDyn.
VectorIteratorRef
Trait that encapsulates an vector elements iterator with specific characteristics and implemetning CloneDyn.
VectorMut
A trait for accessing a mutable reference to a fixed-size array from a collection.
VectorRef
A trait for accessing a reference to a fixed-size array from a collection.
VectorSpace
VectorSpaceMut
VectorWithLength
A trait indicate that entity in case of referencing it can be interpreted as such having specified length LEN.
VectorWithLengthMut
A trait indicate that entity in case of mutable referencing it can be interpreted as such having specified length LEN.

Functions§

angle
Computes the angle between two vectors.
cross
cross_mut
div_scalar
div_scalar_mut
dot
Computes the dot product of two vectors.
is_orthogonal
Returns true if the vector a is perpendicular (orthogonal) to vector b.
mag
Computes the magnitude of a vector.
mag2
Computes the squared magnitude of a vector.
max
max_mut
min
min_mut
mul
mul_mut
mul_scalar
mul_scalar_mut
normalize
Normalizes a vector to unit length.
normalize_to
Normalizes a vector to a specified magnitude.
normalized
Normalizes a vector to unit length.
normalized_to
Normalizes a vector to a specified magnitude.
project_on
Projects vector a onto vector b.
projected_on
Projects vector a onto vector b.
sub
sub_mut
sub_scalar
sub_scalar_mut
sum
sum_mut
sum_scalar
sum_scalar_mut

Type Aliases§

F32x2
F32x3
F32x4
F64x2
F64x3
F64x4