cos()
Table of Contents
Overview
The cos() function takes a number as an argument, and returns the trigonometric cosine of that number (angle measured in radians).
Return Type
- Decimal
Syntax
<variable> = <number>.cos();
(OR)
<variable> = cos( <number> );
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned value. | DECIMAL |
<number> | The number whose cosine value will be returned. | NUMBER or DECIMAL |
Examples
number= 90;
cosValue = number.cos(); // returns -0.4480736161291702
cosValue = number.cos(); // returns -0.4480736161291702