Table of Contents

ATN

(Defined in TRIGONO.BAS)

The ATN() function returns the arctangent of the argument. It is the inverse function of TAN.

Function header

DECLARE FUNCTION ATN AS FLOAT (x AS FLOAT) SHARED STATIC

Warning

You must include the TRIGONO.BAS library in your program before you call this function.

Example

INCLUDE "trigono.bas"
PRINT ATN(0.5) ' will output 0.464088

Note

Trigonometric functions in XC=BASIC were designed to be fast rather than accurate. The result is accurate to 3 to 4 decimal digits (the error range is 0 to 0.0006). Please see this article for details.

See also