Andy Dougherty <[EMAIL PROTECTED]> writes:
> On Tue, 17 Oct 2000, Jorg Ziefle wrote:
>
> > I wondered since quite a time why atan2 takes 2 arguments.
>
> Because otherwise it would be atan1? :-)
>
> Two arguments allows the function to gracefully handle infinite slope.
> It also allows the function to unambiguously assign the correct quadrant.
To expand: consider the results of atan2(1,1) and atan2(-1,-1). Now
compare with the results of atan(1) and, well, atan(1). Slopes are
the same going "up" and "down", but the angle is not!
--
Ariel Scolnicov |"GCAAGAATTGAACTGTAG" | [EMAIL PROTECTED]
Compugen Ltd. |Tel: +972-2-5713025 (Jerusalem) \ We recycle all our Hz
72 Pinhas Rosen St. |Tel: +972-3-7658514 (Main office)`---------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555 http://3w.compugen.co.il/~ariels