def norm_angle(a):
 a = ((a + 360) % 360)
 if (a > 180):
  a = (a - 360)
 return a

def norm_angle ( a ) : a = ( ( a + 360 ) % 360 ) if ( a > 180 ) : a = ( a - 360 ) return a
return angle between -180 and +180 .