tuppu-algebra

Crates.iotuppu-algebra
lib.rstuppu-algebra
version0.1.0
created_at2025-12-05 10:18:12.556312+00
updated_at2025-12-05 10:18:12.556312+00
descriptionGeometric algebra with exact rational coefficients — vectors, bivectors, rotors, and more
homepage
repositoryhttps://github.com/rikii/tuppu-nabu
max_upload_size
id1967979
size200,879
(rickKase)

documentation

README

tuppu-algebra

Geometric algebra with exact rational coefficients — vectors, bivectors, rotors, and more.

Part of the Tuppu Nabu geometric algebra system.

Features

  • Full geometric algebra — Vectors, bivectors, trivectors, rotors
  • Exact arithmetic — Rational coefficients, no floating-point errors
  • Reflection-first design — Build rotations from reflections
  • Any signature — Euclidean, Minkowski, PGA, CGA

Usage

use tuppu_algebra::{Multivector, Signature};

let sig = Signature::euclidean(3);
let e1 = Multivector::basis_vector(&sig, 0);
let e2 = Multivector::basis_vector(&sig, 1);

// Geometric product
let e12 = &e1 * &e2;  // Bivector

// Reflection: v' = -nvn
let v = &e1 + &e2;
let reflected = -(&e1 * &v * &e1);

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt