Eisenstein Integers
Exact hexagonal arithmetic. Zero drift after 10,000 rotations.
IEEE 754 Float
Rotations: 0
Drift: 0.000px
Eisenstein E12
Rotations: 0
Drift: 0.000px
Both points start at (1, 0) and rotate by the same angle each step. Float accumulates error. E12 doesn't.
Rust Quickstart
// Cargo.toml: eisenstein = "0.3"
use eisenstein::{E12, HexDisk};
let z = E12::new(-5, 3);
assert_eq!(z.norm(), 49); // a²-ab+b² = 25+15+9
let dir = E12::snap_from_angle(0.0);
let disk = HexDisk::radius(36); // 3,997 vertices