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
v#=myValue#/360.0:vINT=v#
vWrap#=(v#-vINT)*360.0
if vWrap#<0 then vWrap#=(360.0+vWrap#) `optionally flips the result from negative to positive while keeping the correct angle
do
print (vWrap#)
sync()
loop