Expand description
Math primitives for the Sable engine.
This module provides vector, matrix, and quaternion types optimized for game development and 3D graphics.
§Types
Vec2,Vec3,Vec4— 2D, 3D, and 4D vectorsMat3,Mat4— 3x3 and 4x4 matricesQuat— Quaternion for rotations
§Precision
By default, all types use f32. Enable the f64 feature for double precision.
Structs§
- Mat3
- A 3x3 column-major matrix.
- Mat4
- A 4x4 column-major matrix.
- Quat
- A quaternion for representing rotations.
- Vec2
- A 2D vector.
- Vec3
- A 3D vector.
- Vec4
- A 4D vector.
Constants§
Functions§
- approx_
eq - Checks if two floats are approximately equal.
- clamp
- Clamps a value between min and max.
- degrees
- Converts radians to degrees.
- lerp
- Linear interpolation between two values.
- radians
- Converts degrees to radians.
Type Aliases§
- Float
- The floating-point type used for math operations.