Math.cosdeg(degrees) +
Top  Previous  Next


SWiSH Player Support
SWF4 or later - Supported Internally

Syntax
Math.cosdeg(x)

Arguments
x: A number or expression representing the angle in degrees.

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.cosdeg(90
); // returns 6.12303176911188e-17 (pretty close to 0, cos 90deg = 0)

Note: Requires Advanced Math Support. See here for more information

Flash MX Differences
This function is not implemented in Flash MX.

See Also
Math.acos(), Math.asin(), Math.atan(), Math.cos(), Math.cosdeg(), Math.sin(), Math.sindeg(), Math.tan() and Math.tandeg().