Cos

From AutoIt Wiki

Jump to: navigation, search

Calculates the cosine of a number. Adapted from AutoIt docs.

Contents

[edit] Syntax

$x = Cos(expr)

[edit] Parameters

exprValue to be calculated (in radians). 1 deg = pi/180 radians.

[edit] Return Value

Returns the trigonometric cosine of number.

[edit] Example

$pi = 3.14159265358979
$x = cos($pi / 4)

$degToRad = $pi / 180
$y = Cos(90 * $degToRad)  ;cosine of 90°

[edit] Related Functions

Sin Tan ASin ACos ATan

Personal tools