cos()

Returns the cosine of the given angle in radians.

Syntax

cos(angle)

Parameters

Parameter Type Description
angle Number Angle in radians to compute cosine.

Return Value

Examples

cos(0);        // returns 1
cos(pi()/2);   // returns 0
cos(pi());     // returns -1

See also

pi
sin
asin
cos
acos
tan
atan
atan2
rad2deg
deg2rad