Math.tan( ) Method | Flash 5; can be used when exporting Flash 4 movies |
compute the tangent of an angle |
An angle, in radians (not degrees), normally in the range of -/2 to /2, although any angle will suffice, as tangent is a periodic function.
The tangent of theta (the result is in the range of -Infinity to Infinity).
The tan( ) method returns the trigonometric tangent of an angle. In a right triangle, the tangent of an angle is the result of dividing the length of the side opposite the angle by the length of the side adjacent to the angle. This is also the same as the ratio Math.sin(theta)/Math.cos(theta), so as cos(theta) approaches zero, tan(theta) approaches Infinity. Therefore, tan(theta) is not calculable for the values -/2, /2, -3/2, 3/2, etc.
trace (Math.tan(0)); // Displays: 0 trace (Math.tan(Math.PI/4)); // Displays: 1
Math.atan( ), Math.cos( ), Math.sin( )