hilbert-2d

0.0.1 • Public • Published

Hilbert-2D npm version CircleCI

2D Hilbert curve coordinate encoder/decoder

Hilbert-gif;

The code is ported from Go to JS from https://github.com/google/hilbert/ Inlined rotations to eliminate function calls.

Install

npm install -S hilbert-2d

API

const h = require('hilbert-2d');
 
h.encode(16, [12, 23]); // 837
h.decode(16, 837);      // [12, 23]

TODO

  • Add range queries and sorting
  • Add examples

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i hilbert-2d

    Weekly Downloads

    6

    Version

    0.0.1

    License

    Apache-2.0

    Last publish

    Collaborators

    • w8r