A quick, economical way to replace DBP's old WRAPVALUE command for rotation angles with just a few lines.
This is only raw lines of code... you can craft your own custom function or subroutine based on this formula.
If you find a mathematical error I'll try to fix it based on suggestions, but it should work for any value you input.
myValue#=1020 `<< change only this value to test the code
if vWrap#<0 then vWrap#=(360.0+vWrap#) `optionally flips the result from negative to positive while keeping the correct angle