WrapCircular function

Wrap periodic data to any range