Expand description
Original, dependency-free scalar game mathematics.
Vectors use f32; angles are radians. Matrices are column-major and multiply
column vectors. a * b applies b before a. Rotation is right-handed.
Explicit try_* operations report degenerate inputs; unchecked normalization
and inversion return NaNs instead of silently substituting another transform.
Modules§
- prelude
- Frequently used types and constructor functions.
Structs§
- BVec2
- BVec3
- BVec4
- Color
- Unpremultiplied RGBA floating-point channels. No implicit gamma conversion.
- Mat4
- Column-major 4x4 matrix acting on column vectors:
translation * rotation * scale. - Quat
- Quaternion stored as vector part
(x,y,z)followed by scalar partw. - Rect
- Axis-aligned 2D rectangle. Width and height should be nonnegative.
- Vec2
- Vec3
- Vec4
Enums§
- Euler
Rot - Intrinsic Euler rotations:
XYZ(a,b,c)composesRx(a) * Ry(b) * Rz(c).
Traits§
- Vec2
Swizzles - Compatibility imports: common swizzles are inherent methods.
- Vec3
Swizzles - Vec4
Swizzles