cos

Returns the cosine of an angle stored in and expressed in radians.

An error occurs if angle does not contain a valid angle.

Syntax

   cos(angle)
Table 1. cos parameters
Parameter Type Description
angle Decimal number Any decimal number representing the angle in radians.

Returns

A string containing the cosine, or null if an error occurs.

Example

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>