Skip to main content

box2d_rust/math_functions/
mod.rs

1// Port of box2d-cpp-reference/include/box2d/math_functions.h and src/math_functions.c
2// SPDX-FileCopyrightText: 2023 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 query;
16mod rotation;
17mod scalar;
18mod transform;
19mod types;
20mod validate;
21mod vector;
22
23pub use query::*;
24pub use rotation::*;
25pub use scalar::*;
26pub use transform::*;
27pub use types::*;
28pub use validate::*;
29pub use vector::*;