Skip to main content

Module utils

Module utils 

Source
Expand description

Miscellaneous utilities.

Constants§

DIM_MINUS_ONE
Dimension minus one (1 for 2D, 2 for 3D).

Traits§

AngularInertiaOps
Trait for angular inertia operations.
ComponentMul
Extension trait for element-wise vector operations
CopySign
Trait to copy the sign of each component of one scalar/vector/matrix to another.
CrossProduct
Trait for computing generalized cross products.
CrossProductMatrix
Trait for computing cross product matrices.
DotProduct
Trait for computing generalized dot products.
IndexMut2
Methods for simultaneously indexing a container with two distinct indices.
MatrixColumn
Extension trait for matrix column access (like nalgebra’s .column())
OrthonormalBasis
Trait to compute the orthonormal basis of a vector.
PoseOps
Trait for pose types (isometry) providing access to rotation and translation.
RotationOps
Trait implemented by 2D rotation types (UnitComplex).
ScalarType
Trait for types that can be used as scalars in the generic code supporting both the scalar and AoSoA SIMD pattern.
SimdLength
Trait for computing generalized lengths.
SimdRealCopy
The trait for real numbers used by Rapier.
SimdSelect
Trait for conditional selection between two values.

Functions§

mat_to_na
Convert glam Matrix to nalgebra Matrix2<Real> (2D matrix)
smallest_abs_diff_between_angles
Calculate the difference with smallest absolute value between the two given angles.
smallest_abs_diff_between_sin_angles
Calculate the difference with smallest absolute value between the two given values.
try_normalize_and_get_length
Try to normalize a vector and return both the normalized vector and the original length.
vect_to_na
Convert glam Vector to nalgebra SimdVector<Real>