Math.cos method
The Math.cos method returns the
cosine of a number (this number must
be an angle in radians).
Syntax
javascriptMath.cos(number);
Example
Let's output the cosine of
the number 34:
javascriptconsole.log(Math.cos(34));
The code execution result:
javascript-0.8485702747846052
See also
-
the
Math.sin method
that returns the sine of a number
-
the
Math.tan method
that returns the tangent of a number
-
the
Math.asin method
that returns the arcsine of a number
-
the
Math.acos method
that returns the arccosine of a number
-
the
Math.atan method
that returns the arctangent of a number