pub fn morton_decode_array<Coordinate, Key, const N: usize>(
input: Key,
) -> [Coordinate; N]Expand description
Receives a Key value and unscrambles it into an array.
Returns an array of Coor values that were decoded from the input.
Panics if the Key value is too small for so many Coor values.
ⓘ
let _: [u16; 5] = morton_decode_array(6000000u64);§Examples
assert_eq!(morton_decode_array::<u8, u16, 2>(3u16), [1u8, 1]);
let input = [1u32, 2];
let encoded_input: u64 = morton_encode_array(input);
let reassembled_input: [u32; 2] = morton_decode_array(encoded_input);
assert_eq!(input, reassembled_input);