The mathCos() function returns the cosine of a number.
mathCos()
0.12.0
A number (given in radians)
The cosine of the given number
mathCos(0); // 1mathCos(Math.PI / 2); // 0 (approximately)mathCos(Math.PI); // -1 Copy
mathCos(0); // 1mathCos(Math.PI / 2); // 0 (approximately)mathCos(Math.PI); // -1
Returns the cosine of a number.
A numeric expression that contains an angle measured in radians.
The
mathCos()
function returns the cosine of a number.Since
0.12.0
Param: x
A number (given in radians)
Returns
The cosine of the given number
Example