5
$\begingroup$

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 ..

$\endgroup$
14
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.