<分区>
当我使用 math.cos() 和 math.sin() 函数时,我的 python 解释器表现得很奇怪。例如,如果我在我的计算器上这样做:
cos(35)*15+9 = 21.28728066
sin(35)*15+9 = 17.60364655
但是当我在 python(3.2 和 2.7)上执行此操作时
>>> import math
>>> math.cos(35)*15+9
-4.5553830763726015
>>> import math
>>> math.sin(35)*15+9
2.577259957557734
为什么会这样?
编辑:如何将 Python 中的弧度更改为度数,以防万一?