ferravex_math/lib.rs
1//! Original, dependency-free scalar game mathematics.
2//!
3//! Vectors use `f32`; angles are radians. Matrices are column-major and multiply
4//! column vectors. `a * b` applies `b` before `a`. Rotation is right-handed.
5//! Explicit `try_*` operations report degenerate inputs; unchecked normalization
6//! and inversion return NaNs instead of silently substituting another transform.
7#![forbid(unsafe_code)]
8
9mod matrix;
10mod quaternion;
11mod shapes;
12mod vector;
13pub use matrix::*;
14pub use quaternion::*;
15pub use shapes::*;
16pub use vector::*;
17
18/// Frequently used types and constructor functions.
19pub mod prelude {
20 pub use crate::{Color, EulerRot, Mat4, Quat, Rect, Vec2, Vec3, Vec4, vec2, vec3, vec4};
21}