if you use
Code:
ang
it will keep the angle between -180 and 180

hope this helps