Attribute VB_Name = "BufferMath"

Option Explicit

Public Function Forward(Index As Long, BufferSize As Long) As Long
    Forward = (Index + 1) Mod BufferSize
End Function

Public Function Backward(Index As Long, BufferSize As Long) As Long
    Backward = (Index + BufferSize - 1) Mod BufferSize
End Function
