Looks interesting is there an example you could post showing a practical use as I'm not a maths type 
Easiest way of using it is :
value=wrap(org,-5.0,10.0)
Any value outside the -5 to 10.0 range will be wrapped around, so -6 becomes 9, and 11.0 because -4, 12 because -3 and so on...
As Ruidesco as stated, the most frequest use will be to make sure a value is always between 0 and 359, no matter how much outside these ranges it is.