Cos unexpected results in developer tools

Can anyone point me what is going on, or what im doing wrong please?

in developer tools i add this;

cosine test
test result should be
{{ cos(0)}} :1
{{ cos(1)}} : 0.999848
{{ cos(45)}} :0.707107
{{ cos(90)}} :0

results below
cosine test
test actual result
1.0 :1
0.5403023058681398 : 0.999848
0.5253219888177297 :0.707107
-0.4480736161291702 :0

the cosine results are not what I expected

Many thanks

Is it expecting the input to be measured in radians rather than degrees?

Many thanks!

yep its expecting input in radians,tested and working correctly now.

1 Like