Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

@thi.ng/morton

1.0.5 • Public • Published

@thi.ng/morton

npm (scoped) npm downloads Twitter Follow

This project is part of the @thi.ng/umbrella monorepo.

About

Z-order-curve / Morton encoding & decoding for 1D, 2D, 3D.

Installation

yarn add @thi.ng/morton

Dependencies

Usage examples

import * as m from "@thi.ng/morton";
 
m.mux2(23, 42);
// 2461
 
m.demux2(2461)
// [ 23, 42 ]
 
m.muxScaled2(0.25, 0.75)
// 2594876074
 
m.demuxScaled2(m.muxScaled2(0.25, 0.75))
// [ 0.2500038147554742, 0.7499961852445258 ]

Authors

  • Karsten Schmidt

License

© 2015 - 2018 Karsten Schmidt // Apache Software License 2.0

install

npm i @thi.ng/morton

Downloadsweekly downloads

29

version

1.0.5

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability