hilbert16 0.1.0

Hilbert transforms between 1D and 2D space, optimized for u16 coordinates.
Documentation
  • Coverage
  • 85.71%
    12 out of 14 items documented9 out of 11 items with examples
  • Size
  • Source code size: 11.48 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.35 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • ryanavella/hilbert16
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ryanavella

hilbert16

Hilbert transforms between 1D and 2D space, optimized for u16 coordinates.

License: MIT License: Unlicense crates.io docs.rs

Examples

use hilbert16::{Curve, Point};

let order = 9;
let curve = Curve::new(order).unwrap();
            
let p = Point { x: 175, y: 295 };
println!("{:?} => {}", p, curve.dist_at(p).unwrap();
let d = 94_085;
println!("{} => {:?}", d, curve.point_at(d).unwrap();