According to my understanding, and my calculator, cos(90 degrees) equals 0.
In my code, I have a function that allows me to type in degrees whenever I need to:
function deg(i)
{
return i*Math.PI/180;
}
Although, when calling Math.cos(deg(90)); the output I receive is 6.123233995736766e-17.
Why could such a thing possibly happen?
(Please excuse me for my bad English)