The example code for Math.tan at:
http://www.w3schools.com/jsref/jsref_tan.asp
uses:
Math.tan(90)
as an example, however Math.tan takes radians, not degrees. Very rarely would you specify 90 radians. I would recommend this be something like:
Math.tan(Math.PI)
or something similar as well as adding a note mentioning it takes radians.