# Math.cos is returning wrong value?

The cos of 45 should be returning a value of: sqr(2)/2

When I checked the following: test = math.cos(45) it returns the value of: 0.5253

So I thought I had to convert it to degrees: test = math.degrees(math.cos(45)) but instead it returns the value of: 30.0987 I don't know what I'm doing wrong here. I just want the cos(45) to return a value of: sqr(2)/2 just as my calculator does ..

Try math.cos(math.radians(45)). Trigonometric functions need their arguments in radians, Blender also uses radians internally.