Wednesday, 30 August 2017

javascript - Why does Math.cos(90 * Math.PI/180) yield 6.123031769111... and not zero?

I convert degrees to radians (degrees * Math.PI/180) but why does the following:



Math.cos(90 * Math.PI/180)



yield 6.123031769111... and not zero?



I'm trying to perform 2D rotations uses matrixes and the results are completely out of whack.

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...