Skip to main content

Module math

Module math 

Source
Expand description

Math types and traits used by the crate.

Most of the math types are feature-dependent, so they will be different for 2d/3d and f32/f64.

Structs§

DRot2
A double-precision version of Rot2.

Constants§

DIM
The active dimension.

Traits§

MatExt
An extension trait for matrix types.
RecipOrZero
An extension trait for computing reciprocals without division by zero.
ToF32Precision
Adjusts the precision of the math type to f32.
ToRealPrecision
Adjusts the precision of the math type to the Real number precision.

Functions§

next_down_vector
Returns a single-precision vector with each component being at least as small as the corresponding component of the input vector.
next_up_vector
Returns a single-precision vector with each component being at least as large as the corresponding component of the input vector.
orthonormal_basis
Computes the rotation matrix of the orthonormal basis computed from the given axes.
orthonormal_basis_from_vec
Computes the rotation matrix of the orthonormal basis computed from the given axis.

Type Aliases§

RMat2
The real number 2x2 matrix type used by Avian.
RMat3
The real number 3x3 matrix type used by Avian.
RVec2
The real number 2D vector type used by Avian.
RVec3
The real number 3D vector type used by Avian.
RVector
The real number vector type used by Avian.
Real
The real number type used by Avian.
SymmetricTensor
The symmetric tensor type used by Avian. Often used for angular inertia.