Skip to main content

morton_code

Function morton_code 

Source
pub fn morton_code(x: u32, y: u32, z: u32) -> u64
Expand description

Compute the 3-D Morton code (Z-curve) for integer coordinates.

Interleaves the bits of x, y, and z to produce a single u64 space-filling key. Each coordinate may use up to 21 bits.