gilbert_xy2d
function gilbert_xy2d( px, py, W, H): number;Defined in: gilbert.ts:75
Maps a cell of a W × H grid to its position along the curve.
Unlike hilbert_encode the grid need not be square nor a power of two, so elongated data can be gridded at its own aspect ratio.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
px | number | Column, in [0, W). |
py | number | Row, in [0, H). |
W | number | - |
H | number | - |
Returns
Section titled “Returns”number
The curve index, in [0, W·H).