Function wrap_index
pub fn wrap_index<I>(idx: I, size: usize) -> usize
Expand description
Wraps a dimension index to be within the bounds of the dimension size.
§Arguments
idx
- The dimension index to wrap.
size
- The size of the dimension.
§Returns
The positive wrapped dimension index.