import math


def degrees(rad_angle) :
    """Converts and angle in radians to degrees, mapped to the range [-180,180]"""
    angle = rad_angle * 180 / math.pi
    #Note this assume the radians angle is positive as that's what MMTK does
    while angle > 180 :
        angle = angle - 360
    return angle