advanceIndex method

int advanceIndex(
  1. int index,
  2. int steps
)

Returns the ring index after steps forward positions.

Implementation

int advanceIndex(int index, int steps) => _normalize(index + steps, capacity);