1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! math re-exports and custom utilities
//!
//! this crate wraps [`glam`] for vector/matrix math and provides engine-specific types
//! like [`Transform`], [`Color`], and [`Rect`].
//!
//! # re-exports
//!
//! the full `glam` crate is re-exported for convenience, so you can access
//! any glam types directly via `lunar_math::glam`.
pub use glam;
/// 2D vector type alias.
///
/// backed by [`glam::Vec2`], provides x, y components with SIMD support.
pub type Vec2 = Vec2;
/// 3D vector type alias.
///
/// backed by [`glam::Vec3`]. use for general-purpose 3D math and component storage.
pub type Vec3 = Vec3;
/// 16-byte aligned 3D vector type alias.
///
/// backed by [`glam::Vec3A`]. use in hot-loop math (culling, physics, SoA buffers)
/// where SIMD register fit matters — same cost as Vec3 on most paths but aligns
/// to 16 bytes so glam's SSE2/NEON paths can load it in one instruction.
pub type Vec3A = Vec3A;
/// 4D vector type alias.
///
/// backed by [`glam::Vec4`], useful for packed colors and shader uniforms.
pub type Vec4 = Vec4;
/// 2x2 matrix type alias.
///
/// backed by [`glam::Mat2`], used for 2D rotations.
pub type Mat2 = Mat2;
/// 3x3 matrix type alias.
///
/// backed by [`glam::Mat3`]. useful for 2D affine transforms and normal matrix computation.
pub type Mat3 = Mat3;
/// 4x4 matrix type alias.
///
/// backed by [`glam::Mat4`]. useful for custom projection matrices and 3D transforms.
pub type Mat4 = Mat4;
/// quaternion type alias.
///
/// backed by [`glam::Quat`]. used for 3D rotation in `LocalTransform3d`.
/// quaternions avoid gimbal lock and interpolate cleanly via slerp.
pub type Quat = Quat;
pub use ScreenRect;
pub use ;