cos

returns the cosine of an angle (in radians).

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

the cos of angle

# Params

- angle : A positive or negative number, or an expression that evaluates to a number.

# Examples

cos(pi)

the cos of 0

put cos(the startAngle of graphic 3) into field "Cosine"

# Description

Use the cos function to find the cosine of an angle.

The cos function repeats every `2 * pi` radians: `cos(x) = cos(x + 2 * pi)`, for any value of `x`.

The cos function requires its input to be in radians. To provide an angle in degrees, use the following custom function:

function cosInDegrees angleInDegrees return cos(angleInDegrees * pi / 180) end cosInDegrees

# Tags

# See

- **constant:** pi - **glossary:** function, radian, custom function, return, degree