SWiSH Player Support
SWF4 or later - Supported Internally
Syntax
Math.cos(x)
Arguments
x: A number or expression representing the angle in radians.
Returns
A number, the cosine of (x).
Description
Calculates the cosine of x. This will be a value from -1.0 to 1.0.
Sample
Math.cos(Math.PI / 2); // returns 6.12303176911188e-17 (pretty close to 0, cos 90deg = 0)
Note: Requires Advanced Math Support. See here for more information
See Also
Math.acos(), Math.asin(), Math.atan(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan() and Math.tandeg().