My python interpreter is funky when I use the math.cos () and math.sin () functions. For example, if I do this on my calculator:
cos(35)*15+9 = 21.28728066 sin(35)*15+9 = 17.60364655
But when I do it in python (both 3.2 and 2.7)
>>> import math >>> math.cos(35)*15+9 -4.5553830763726015 >>> import math >>> math.sin(35)*15+9 2.577259957557734
Why is this happening?
EDIT: How to change Radian in Python to degrees, just in case?
python math trigonometry sin cos
Ripspace
source share