Module math

Module math 

Source
Expand description

Math types and utilities for parry, wrapping glam types.

Re-exports§

pub use f32 as Real;
pub use i32 as Int;

Structs§

Mat2
A 2x2 column major matrix.
Mat3
A 3x3 column major matrix.
Pose2
A 2D pose (rotation + translation), representing a rigid body transformation (f32 precision).
Pose3
A 3D pose (rotation + translation), representing a rigid body transformation (f32 precision).
Rot2
A 2D rotation represented as a unit complex number (f32 precision).
SymmetricEigen2
The eigen decomposition of a symmetric 2x2 matrix (f32 precision).
SymmetricEigen3
The eigen decomposition of a symmetric 3x3 matrix (f32 precision).
Vec2
A 2-dimensional vector.
Vec3
A 3-dimensional vector.
Vec4
A 4-dimensional vector.
Vec3A
A 3-dimensional vector.

Constants§

DEFAULT_EPSILON
The default tolerance used for geometric operations.
DIM
The dimension of the space.
SIMD_LAST_INDEX
SIMD_WIDTH - 1
SIMD_WIDTH
The number of lanes of a SIMD number.
TWO_DIM
The dimension of the space multiplied by two.

Traits§

ComplexField
Trait shared by all complex fields and its subfields (like real numbers).
MatExt
Extension trait for square matrix types.
RealField
Trait shared by all reals.
VectorExt
Extension trait for glam vector types to provide additional functionality.

Functions§

ivect_to_vect
Converts an integer vector to a floating-point vector.
vect_to_ivect
Converts a floating-point vector to an integer vector.

Type Aliases§

AngVector
The angular vector type (scalar for 2D).
AngularInertia
The angular inertia of a rigid body (scalar for 2D).
CrossMatrix
A matrix that represent the cross product with a given vector.
IVector
The integer vector type.
Matrix
The matrix type.
Matrix2
A 2x2 matrix type for use in any dimension context.
Matrix3
A 3x3 matrix type for use in any dimension context.
Orientation
The orientation type (scalar angle for 2D).
Pose
The transformation matrix type (pose = rotation + translation).
PrincipalAngularInertia
The principal angular inertia of a rigid body (scalar for 2D).
Rot3
A 3D rotation represented as a unit quaternion (f32 precision).
Rotation
The rotation type.
SdpMatrix
A 2D symmetric-definite-positive matrix.
SimdBool
A SIMD bool with SIMD_WIDTH lanes.
SimdReal
A SIMD float with SIMD_WIDTH lanes.
SpatialVector
A vector with a dimension equal to the maximum number of degrees of freedom of a rigid body.
SymmetricEigen
The result of eigendecomposition of a symmetric matrix.
Vector
The vector type.
Vector2
A 2D vector type for use in any dimension context.
Vector3
A 3D vector type for use in any dimension context.