$100 reward, Reseting degrees to 0 after 360? I NEED TO KNOW NOW!

I have to tell weather my dial is in-between certain degrees but the degrees surpass 360 into the thousands! how do I fix this?

Give me your paypal, I will reward you if you help me complete this game in under 4 hours

My skype is austin_rau

local degrees = my\_dial.degrees % 360

If all you need is a position, that should do it.

This will mess up some of your properties, for instance if you want to compare the order of two angles, you may need the original values. Also, if you want to interpolate a rotation between the new angles, you might want to take the shorter of the two paths:

if math.abs(degrees1 - degrees2) \> 180 then if degrees1 \< degrees2 then degrees1 = degrees1 + 360 else degrees2 = degrees2 + 360 end end -- now rotate with the new values
local degrees = my\_dial.degrees % 360

If all you need is a position, that should do it.

This will mess up some of your properties, for instance if you want to compare the order of two angles, you may need the original values. Also, if you want to interpolate a rotation between the new angles, you might want to take the shorter of the two paths:

if math.abs(degrees1 - degrees2) \> 180 then if degrees1 \< degrees2 then degrees1 = degrees1 + 360 else degrees2 = degrees2 + 360 end end -- now rotate with the new values