Table of Contents

cos

Description

Calculate the cosine of an angle.

Function prototype

double cos <double:Angle>

Arguments

Name Type Comment
Angle double An angle, in radians, the cosine of which is to be calculated.

Return value

The cosine of the angle, as a double.

Example

double angle
set angle <zs:DegToRad 60> // convert 60 degrees to radians

echo <zs:cos angle> // cos of 60 degrees should be 0.5 

… the output of which is written to the event log by echo as:

0.5

Comments

None.

See also