lang • atan

ATan

Value = ATan ( Number ) Value = Atn ( Number )

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!

Examples

Print ATan(0.5)
0.463647609001

The arc-tangent 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.

See also