ATan
Value = ATan ( Number AS Float ) AS Float
Value = Atn ( Number AS Float ) AS Float
The Atn function is the inverse of the
Tan function. It computes the arc-tangent of a number. That return value is in radians and in the range from -π/2 to π/2 radians (-90 to 90 degrees)
 |
To convert from degrees to radians, multiply degrees by π/180. To convert from radians to degrees, multiply radians by 180/π.
Or better use the Deg or Rad functions!
|
Example
PRINT ATan(0.5)
0.463647609001
The arctangent can be used to calculate the value for π as shown below:
PRINT "The Value of Pi = " ; 4 * Atn(1)
The Value of Pi = 3.14159265359
There is another function
Ang (alias
ATan2) which takes two arguments and returns the angle correctly over 4 quadrants.