Space-filling curve: Mapping 3D space onto 1D space, preserving proximity
bugfix-66.com
bugfix-66.com
https://en.m.wikipedia.org/wiki/Z-order_curve
The Morton space-filling curve allows, for example, linear representations of 3D voxel spaces for efficient GPU rendering.
Do you understand the mechanism well enough to fix the tiny bug in the Go code?