Skip to main content

swizzle

Function swizzle 

Source
pub fn swizzle(index: usize, num_steps: usize, step_length: u32) -> Coords2d
Expand description

Maps a linear index to 2D zigzag coordinates (x, y) within strips of num_steps steps of step_length (> 0) elements each.