Math.cos()

Get the cosine of a Number in radians.

Signature

Math.cos(x: Number) => Number

Description

Gets the cosine of a Number in radians.

Parameters

Parameter Type Required Description

x

Number

true

Number representing an angle in radians.

Return value

Type Description

Number

Cosine of the provided number between -1 and 1, inclusive.

Examples

Math.cos(2 * Math.PI)
1.0
\