Choose where you’d like to start

cos()

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> );
ParameterDescriptionData 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

Get Started Now

Execute