
Mouse Object
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
615
Math.tan() Method
compute the tangent of an angle
Flash 5; can be used when exporting Flash 4 movies
Math.tan(theta)
Arguments
theta 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.
Returns
The tangent of theta (the result is in the range of –Infinity to Infinity).
Description
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),soascos(theta) approaches zero, tan(theta) approaches Infinity. There-
fore, tan
(theta) is not calculable for the values –π/2, π/2, –3π/2, 3π/2, etc.
Example
trace (Math.tan(0)); // Displays: 0
trace (Math.tan(Math.PI/4)); // Displays: 1
See Also
Math.atan( ), Math.cos( ), Math.sin( )
maxscroll Property
the last legal top line of a text field
Flash 4; replaced by TextField.maxscroll in Flash 6
theTextField.maxscroll
Returns
A positive integer representing the line number of the last legal top line of a text field.
Description
The maxscroll property tells us the largest allowed scroll value for