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