Returns the cosine of an angle stored in and expressed in radians.
An error occurs if angle does not contain a valid angle.
cos(angle)
Parameter | Type | Description |
---|---|---|
angle | Decimal number | Any decimal number representing the angle in radians. |
A string containing the cosine, or null if an error occurs.
In this example, the result of cos is "-0.416147".
<field sid="cosineField">
<label>Test cos()</label>
<format>
<datatype>string</datatype>
<constraints>
<mandatory>on</mandatory>
</constraints>
</format>
<value compute="cos('2')"></value>
</field>