2020
09-27
09-27
python 弧度与角度互转实例
我就废话不多说了,还是直接看代码吧!importmathdefdeal(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/6deal(yaw)yaw=-math.pi/3deal(yaw)输出30.029.999999999999996-60.0-59.99999999999999补充知识:MATLAB中角度转换成弧度函数——degtoraddegtoradConvertanglesfromdegrees...
继续阅读 >