affine-rs 0.1.0

Two-dimensional affine transformations for Rust
Documentation
  • Coverage
  • 86.67%
    39 out of 45 items documented1 out of 32 items with examples
  • Size
  • Source code size: 24.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 497.12 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • XiaoYang943/affine-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • XiaoYang943

affine-rs

affine-rs is a dependency-free Rust library for two-dimensional affine transformations. It is a Rust-native rewrite of the mathematical core of affine-py.

use affine_rs::Affine;

let transform = Affine::translation(10.0, 20.0)
    .compose(Affine::scale(2.0, 2.0));
let point = transform.transform_point([3.0, 4.0]);

assert_eq!(point, [16.0, 28.0]);