L3DT users' wiki
Large 3D terrain generator

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

 
plugins/general/zeoscript/reference/functions/cos.txt · Last modified: 2017/08/31 07:33 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki