graphics::modular_index
pub fn offset(n: usize, i: usize, off: isize) -> usize
Computes modular offset safely for indices.