[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|              ATN2               |
+---------------------------------+
ATN2(<expN1>, <expN2>)

-----------------------------------
Returns (in radians) angle size from sine and cosine values.
Return value - Numeric
-----------------------------------

This trigonometric function returns an arc tangent angle (in radians)
for all four quadrants.  With the ATN2() function you specify the x and
y coordinates as opposed to specifying the tangent value, as in the
ATAN() function.  The ATN2() function eliminates errors caused by
division by 0.

The x coordinate is <expN1>, and the y coordinate is <expN2>.  The value
of <expN1>/<expN2> must be between -pi and +pi (-3.14159 to 3.14159).

The result of ATN2() may be converted to degrees with the RTOD()
function.  The number of decimal places in the result may be specified
with the SET DECIMALS command.

Clauses
-------

<expN1>
        x coordinate.

<expN2>
        y coordinate.

+---------------------------------+
|            Examples             |
+---------------------------------+
? PI()

? ATN2(0,-1)

STORE COS(PI()) TO X
STORE SIN(PI()) TO Y
? ATN2(Y,X)

? ATN2(Y,X)/PI()

-----------------------------------

See Also:  ATAN(), DTOR(), RTOD(), SET DECIMALS, TAN()

-----------------------------------

See Also: ATAN() DTOR() RTOD() SET DECIMALS TAN()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson