Function lindel::hilbert_decode [−][src]
pub fn hilbert_decode<Coordinate, const N: usize>(
input: <Coordinate as IdealKey<N>>::Key
) -> [Coordinate; N] where
Coordinate: IdealKey<N> + ToPrimitive + PrimInt + BitOrAssign + BitAndAssign + BitXorAssign,
<Coordinate as IdealKey<N>>::Key: ValidKey<Coordinate> + BitXorAssign,
A free function for decoding a Hilbert Index into an array of primitive integers.
Examples:
let output: [u8; 4] = hilbert_decode(0xDEADBEEFu32); // Please note the explicit declaration of the output data type. assert_eq!(output, [199u8, 38, 136, 240]);
Implemented as thin wrapper around the from_hilbert_index
method.