cos
The cos() method returns the cosine of an angle expressed in radians. Cosine is a fundamental trigonometric function that returns the x-coordinate of a point on the unit circle.
Interactive example
Syntax
typescript
function cos<
GenericInput extends number,
>(input: GenericInput): numberParameters
input: The angle in radians for which to calculate the cosine.
Return value
The cosine of the given angle, a value between -1 and 1.
See also
sin- Calculates the sine of an angletan- Calculates the tangent of an angleacos- Calculates the arccosine
