May 2001
Intermediate to advanced
720 pages
23h 24m
English
Math.sin( ) Method — compute the sine of an angle
Flash 5; may be used when exporting Flash 4 movies
Math.sin(theta)
An angle, in radians (not degrees), in the range 0 to 2π.
The sine of theta (the result is in the
range -1.0 to 1.0).
The sin( ) method returns
the trigonometric sine of an angle. In a right triangle, the sine of
an angle is the result of dividing the length of the side opposite
the angle by the triangle’s hypotenuse.
Note that sin( ) expects angles to be provided
in radians, not degrees.
trace (Math.sin(0)); // Displays: 0 trace (Math.sin(Math.PI/2)); // Displays: 1.0
The sin( ) function can be used along with
cos( ) to calculate a point on a circle. See the
example under Math.cos( ).
Math.asin( ), Math.cos( ),
Math.tan( )
Read now
Unlock full access