[Main]
Name=atan2
Type=Function
Subtype=ROM Call
Header Files=math.h, timath.h
Definition=float atan2 (float x, float y);
Attributes=__attribute__((__const__))

[ROM Call]
Index=$F8

[Description]
Four-quadrant arc tangent of y/x (or argument of the complex number).

[Explanation]
atan2 returns the four-quadrant arc tangent of <I>y</I>/<I>x</I>. More precise,
it returns the argument of the complex number <I>x</I>&nbsp;+&nbsp;<I>y</I>&nbsp;<I>i</I>.
So, the result is in the range -<I>pi</I> to <I>pi</I>.
<BR><BR>
<B>Note:</B> atan2 produces correct results even when the
resulting angle is near <I>pi</I>/2 or -<I>pi</I>/2 (<I>x</I> near
zero). If both <I>x</I> and <I>y</I> are zeros, atan2 returns <A HREF="$$LINK(NAN)">NAN</A>.

[References]
In=catan, cln, bascmd.h/cmd_sinreg, basfunc.h/push_rec_to_angle, unknown.h/GR3_handleEvent
Out=is_sinf, is_transfinite, is_uinf_or_nan, unknown.h/_bcd_math
