Skip to main content

affn

Stable

Compile-time safe affine coordinate transformations with reference frame tracking.

2 stars
0 forks
Rust
AGPL-3.0
Updated yesterday

Why it exists

affn powers Siderust's coordinate system, encoding reference frames and centers in the type system. Prevents mixing incompatible coordinate systems at compile time.

Key Features

  • SIMD-optimized operations
  • Const-friendly APIs
  • Serde support
  • No-std compatible

Getting Started

# Add to your Cargo.toml
[dependencies]
affn = "0.1"

# Transform some points
use affn::{Point2, Transform2};

let transform = Transform2::rotate(45.0_f32.to_radians())
    .then_translate(10.0, 5.0);
let point = Point2::new(1.0, 0.0);
let transformed = transform.apply(point);

Contributing

We welcome contributions! Here's how you can help:

  • 1 Fork the repository and create your branch from main
  • 2 Make your changes and add tests if applicable
  • 3 Ensure all tests pass with cargo test
  • 4 Submit a pull request with a clear description

License

This project is licensed under the AGPL-3.0 license. See the LICENSE file for details.

Latest Release

v0.2.1 Feb 9, 2026
View release notes

Tags

math graphics geometry rust