cos

math

Calculates the cosine of an angle in radians

Syntax

cos(number)

Parameters

number (number)

The angle in radians

Returns

number

The cosine of the angle

Examples

Input:
0 | cos
Output:
1
Input:
pi | cos
Output:
-1
Input:
cos(pi / 3)
Output:
0.5

The cos() function calculates the cosine of an angle provided in radians.

Usage

Use cos() for trigonometric calculations, wave functions, or geometric computations. Remember that input must be in radians.

Related Functions