User Guide
422 Chapter 2: ActionScript Language Reference
Math.acos()
Availability
Flash Player 5. In Flash Player 4, the methods and properties of the Math class are emulated using
approximations and might not be as accurate as the non-emulated math functions that Flash
Player 5 supports.
Usage
Math.acos(x:Number) : Number
Parameters
x
A number from -1.0 to 1.0.
Returns
A number; the arc cosine of the parameter x.
Description
Method; computes and returns the arc cosine of the number specified in the parameter x,
in radians.
Example
The following example displays the arc cosine for several values.
trace(Math.acos(-1)); // output: 3.14159265358979
trace(Math.acos(0)); // output: 1.5707963267949
trace(Math.acos(1)); // output: 0
See also
Math.asin(), Math.atan(), Math.atan2(), Math.cos(), Math.sin(), Math.tan()