Developer Documentation Library > UNICOM Intelligence Function Library > Mathematical functions > Tan
 
Tan
Returns the tangent of an angle.
Syntax
Tan(<value>)
Parameters
<value>
Type: Double
A numeric value that represents an angle in radians.
(return)
Type: Double
Tangent of <value>.
Notes
Tan is used to return the ratio of two sides of a right-angled triangle, relative to one of the smaller angles. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.
An error occurs if <value> is an odd multiple of pi/2 (for example, -pi/2, pi/2, 3pi/2, and so on.). If the current data value is NULL, <value> is 0.0 and the return value is 0.0.
This function is similar to the Tan function in VBScript.
Example
The following mrScriptBasic example uses the Tan function to get the tangent of an angle:
Dim MyTangent
MyTangent = Tan(1.37340076694502) ' Returns 5.0000000000001
See also
Atn
Mathematical functions