I'm trying to understand the math behind the Math.tan method but it doesn't make any sense. Can someone please explain to me how it works?
Firstly the mathematical formula to solve for a tangent angle is Tangent = Opposite/Adjacent. Which means I need to know two sides of the triangle to figure out the tangent angle. However the Math.tan method only accept a single argument in radians, not the length of two sides, so I don't understand how it's figuring out the angle of the tangent.
Next in examples they show passing impossibly huge radian values into the method and getting back a value. For example, W3 schools shows the example of Math.tan(90)
but 90 radians equals 5,156.6 degrees which is an impossible angle for a corner of a right triangle.
How does this method work, what's happening behind the scenes that turns 90 radians into a tangent angle of -1.995200412208242