Tan
Returns the tangent of an angle.
Syntax
Tan(Val)
Parameters
Val
Type: Double
A numeric value that represents an angle in radians.
(return)
Type: Double
Tangent of Val.
Remarks
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 Val 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, Val 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