Math.cos

Returns the cosine of a number.

Syntax

cos(value)

Parameters

Return value

A cosine of the value.

Example

Math.cos(Math.PI)
-1