• Compute the next index for list navigation, optionally looping at the ends.

    Parameters

    • current: number
    • length: number
    • direction: MoveDirection
    • loop: boolean = true

    Returns number