import math def deal(yaw): if(yaw<0): print(-(abs(yaw)/math.pi)*180) print(math.degrees(yaw)) else: print((abs(yaw)/math.pi)*180) print(math.degrees(yaw)) yaw=math.pi/6 deal(yaw) yaw=-math.pi/3 deal(yaw)