box3d_rust/math_functions/mod.rs
1// Port of box3d-cpp-reference/include/box3d/math_functions.h and src/math_functions.c
2// SPDX-FileCopyrightText: 2025 Erin Catto
3// SPDX-License-Identifier: MIT
4//
5// Split into focused submodules to stay under the project file-length limit. The
6// submodules form one flat namespace: everything is re-exported here, so callers
7// use `crate::math_functions::<name>` exactly as before.
8
9// Float literals are written with the exact digits of the C source, and Pos math casts
10// through PosScalar so the same expression compiles in both precision modes (the cast is
11// a no-op in single precision). These allows cascade into the submodules below.
12#![allow(clippy::excessive_precision)]
13#![allow(clippy::unnecessary_cast)]
14
15mod internal;
16mod matrix;
17mod quat;
18mod query;
19mod ray_triangle;
20mod scalar;
21mod transform;
22mod types;
23mod validate;
24mod vector;
25
26pub use internal::*;
27pub use matrix::*;
28pub use quat::*;
29pub use query::*;
30pub use ray_triangle::{
31 intersect_ray_triangle, test_bounds_overlap, test_bounds_ray_overlap,
32 test_bounds_triangle_overlap,
33};
34pub use scalar::*;
35pub use transform::*;
36pub use types::*;
37pub use validate::*;
38pub use vector::*;