Hi, I have a radian measure in the range of (-pi, pi]. But I need it to be in [0,2pi). I have tried doing this -

NewValue = (((OldValue - OldMin) * (NewMax - NewMin)) / (OldMax - OldMin)) + NewMin

But it did not work for me. I'm guessing that is because I'm working with radians. How can I convert these values to the range of [0,2pi)? Any help is appreciated, thanks.