hilbert16

Crates.iohilbert16
lib.rshilbert16
version0.1.0
sourcesrc
created_at2021-01-03 00:10:57.99354
updated_at2021-01-03 00:10:57.99354
descriptionHilbert transforms between 1D and 2D space, optimized for u16 coordinates.
homepagehttps://github.com/ryanavella/hilbert16
repositoryhttps://github.com/ryanavella/hilbert16
max_upload_size
id330791
size11,858
Ryan Avella (ryanavella)

documentation

https://docs.rs/hilbert16

README

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();
Commit count: 2

cargo fmt