Developer Documentation Library > UNICOM Intelligence Function Library > Mathematical functions > Cos
 
Cos
Returns the cosine of an angle.
Syntax
Cos(<value>)
Parameters
<value>
Type: Double
A numeric value that represents an angle in radians.
(return)
Type: Double
Cosine of <value>.
Notes
The Cos function takes an angle in a right-angled triangle and returns a value that corresponds to the length of the side adjacent to the angle divided by the length of the hypotenuse.
If the current data value is NULL, <value> is 0.0 and the return value is 1.0.
This function is similar to the Cos function in VBScript.
Example
The following mrScriptBasic example uses the Cos function to get the cosine of an angle:
Dim MyCosine
MyCosine = Cos(2.7) ' Returns -0.904072142017061
See also
Sin
Mathematical functions