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
62
63
64
65
// Copyright (C) 2024-2026 Tristan Stoltz / Luminous Dynamics
// SPDX-License-Identifier: AGPL-3.0-or-later
// Commercial licensing: see COMMERCIAL_LICENSE.md at repository root
//! N-dimensional geometric algebra for the Symtropy consciousness-physics engine.
//!
//! All types are parameterized by `const D: usize` — the spatial dimension.
//! This forces stack allocation via `nalgebra::SVector<f64, D>`, giving zero-allocation
//! physics ticks with full SIMD optimization for the common 2D/3D/4D cases.
//!
//! # Usage
//! ```
//! use symtropy_math::{Point, Bivector, Rotor, Transform};
//!
//! // 3D rotation in the xy plane by 90°
//! let plane = Bivector::<3>::unit_plane(0, 1);
//! let r = Rotor::from_plane_angle(&plane, std::f64::consts::FRAC_PI_2);
//! let p = Point::<3>::new([1.0, 0.0, 0.0]);
//! let rotated = r.rotate_point(&p);
//! ```
//!
//! The bivector component count is computed at compile time:
//! - 2D: 1 component (xy)
//! - 3D: 3 components (xy, xz, yz)
//! - 4D: 6 components (xy, xz, xw, yz, yw, zw)
pub use Bivector;
pub use Capsule;
pub use ConvexHull;
pub use HalfSpace;
pub use HyperBox;
pub use Hyperplane;
pub use Point;
pub use Rotor;
pub use Shape;
pub use Sphere;
pub use Transform;
/// Type alias for common dimension specializations.
pub type Point2 = ;
pub type Point3 = ;
pub type Point4 = ;
pub type Rotor2 = ;
pub type Rotor3 = ;
pub type Rotor4 = ;
pub type Transform2 = ;
pub type Transform3 = ;
pub type Transform4 = ;
pub type Bivector2 = ;
pub type Bivector3 = ;
pub type Bivector4 = ;