Purpose
Returns the arc-tangent value of a number. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
Atn( num_expr )
num_expr is a numeric expression.
Return Value
Float
Description
The Atn() function returns the arc-tangent of the numeric num_expr value. In other words, Atn() returns the angle whose tangent is equal to num_expr. The num_expr expression can have any numeric value.
The result returned from Atn() represents an angle, expressed in radians, in the range -Pi/2 radians to Pi/2 radians.
To convert a degree value to radians, multiply that value by DEG_2_RAD. To convert a radian value into degrees, multiply that value by RAD_2_DEG. (Note that your program will need to Include "MAPBASIC.DEF" in order to reference DEG_2_RAD or RAD_2_DEG).
Example
Include "MAPBASIC.DEF"
Dim val As Float
val = Atn(1) * RAD_2_DEG
'val is now 45, since the
'Arc tangent of 1 is 45 degrees
See Also:
Acos() function, Asin() function, Cos() function, Sin() function, Tan() function