Expand description
General arithmetics for the vector type General arithmetics for the vector type
Modules§
- exposed
- Exposed namespace of the module.
- orphan
- Orphan namespace of the module.
- own
- Own namespace of the module.
- prelude
- Prelude to use essentials:
use my_module::prelude::*.
Functions§
- angle
- Computes the angle between two vectors.
- cross
- Computes the cross product of two 3D vectors.
- cross_
mut - Computes the cross product of two 3D vectors. This function modifies the first vector in place.
- div
- Performs element-wise division operation of vectors.
- div_mut
- Performs element-wise division operation of vectors. Modifies first vector in place.
- div_
scalar - Performs element-wise division operation of vector with a scalar.
- div_
scalar_ mut - Performs element-wise division operation of vector with a scalar. Modifies first vector in place.
- dot
- Computes the dot product of two vectors.
- is_
orthogonal - Returns
trueif the vectorais perpendicular (orthogonal) to vectorb. - mag
- Computes the magnitude of a vector.
- mag2
- Computes the squared magnitude of a vector.
- max
- Performs element-wise maximum operation on vectors.
- max_mut
- Performs element-wise maximum operation on vectors. Modifies first vector in place.
- min
- Performs element-wise minimum operation on vectors.
- min_mut
- Performs element-wise minimum operation on vectors. Modifies first vector in place.
- mul
- Performs element-wise multiplication operation on vectors.
- mul_mut
- Performs element-wise multiplication operation on vectors. Modifies first vector in place.
- mul_
scalar - Performs element-wise multiplication operation on vector with a scalar.
- mul_
scalar_ mut - Performs element-wise multiplication operation on vector with a scalar. Modifies first vector in place.
- 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
aonto vectorb. - projected_
on - Projects vector
aonto vectorb. - sub
- Performs element-wise subtraction operation of vectors.
- sub_mut
- Performs element-wise subtraction operation of vectors. Modifies first vector in place.
- sub_
scalar - Performs element-wise subtraction operation of vector with a scalar.
- sub_
scalar_ mut - Performs element-wise subtraction operation of vector with a scalar. Modifies first vector in place.
- sum
- Performs element-wise addition operation on vectors.
- sum_mut
- Performs element-wise addition operation on vectors. Modifies first vector in place.
- sum_
scalar - Performs element-wise addition operation on vector with a scalar.
- sum_
scalar_ mut - Performs element-wise addition operation on vector with a scalar. Modifies first vector in place.