Menu
Hello,
I am curious:
When I type cos5 into my calculator, I get: 0.996164698
When I type
document.write(Math.cos(5) + ‘<br />’);
I get: 0.28366218546322624 😮
To keep a long story short, I understand that is has to do with radians vs. degrees. I need to find x and y coordinates expressed in pixels using the cosine function.
Is there any way to force javascript to use degress instead of radians? ?