Scripting > UNICOM Intelligence Function Library > Mathematical functions > Atn
 
Atn
Returns the arctangent of a number.
Syntax
Atn(Val)
Parameters
Val
Type: Double
A numeric value that represents the ratio of the two shorter sides of a right-angled triangle. (The ratio is the length of the side opposite a particular angle divided by the length of the side adjacent to the angle.)
(return)
Type: Double
Arctangent of Val.
Remarks
The return value is the angle in radians whose tangent is Val and which is in the range -pi/2 to pi/2. If the current data value is NULL, Val is 0.0 and the return value is 0.0.
This function is similar to the Atn function in VBScript.
Example
The following mrScriptBasic example uses the Atn function to get the arctangent of a number that represents the ratio of two sides of a right-angled triangle:
Dim MyArcTangent
MyArcTangent = Atn(12.0/5.0) ' Returns 1.17600520709514
See also
Tan
Mathematical functions