Re: atan2 - what and why?
From: Ken Quirici <kquirici_at_yahoo.com>
Date: Wed, 14 May 2014 05:58:17 -0700 (PDT)
Message-ID: <02261b96-49ed-453f-a54a-2f5fb2be0edc_at_googlegroups.com>
On Tuesday, May 13, 2014 4:13:32 PM UTC-4, joel garry wrote:
> On Tuesday, May 13, 2014 11:25:11 AM UTC-7, Ken Quirici wrote:
>
>
>
> >
>
> > Is there some special reason for this to exist at all, and if so, does this reason cover the fact that
>
> >
>
> > asin2 and acos2 don't exist?
>
>
>
> So you don't divide by zero. http://en.wikipedia.org/wiki/Atan2
>
>
>
> jg
>
> --
>
> _at_home.com is bogus.
>
> http://webcache.googleusercontent.com/search?q=cache:8jtYRzMiy00J:www.microvation.org/index.php%3Foption%3Dcom_content%26view%3Darticle%26id%3D27:man-asks-stupid-question%26catid%3D12%26Itemid%3D106+&cd=1&hl=en&ct=clnk&gl=us&client=firefox-a
In a variety of computer languages, the function atan2 is the arctangent function with two arguments. The purpose of using two arguments instead of one is to gather information on the signs of the inputs in order to return the appropriate quadrant of the computed angle, which is not possible for the single-argument arctangent function.
Date: Wed, 14 May 2014 05:58:17 -0700 (PDT)
Message-ID: <02261b96-49ed-453f-a54a-2f5fb2be0edc_at_googlegroups.com>
On Tuesday, May 13, 2014 4:13:32 PM UTC-4, joel garry wrote:
> On Tuesday, May 13, 2014 11:25:11 AM UTC-7, Ken Quirici wrote:
>
>
>
> >
>
> > Is there some special reason for this to exist at all, and if so, does this reason cover the fact that
>
> >
>
> > asin2 and acos2 don't exist?
>
>
>
> So you don't divide by zero. http://en.wikipedia.org/wiki/Atan2
>
>
>
> jg
>
> --
>
> _at_home.com is bogus.
>
> http://webcache.googleusercontent.com/search?q=cache:8jtYRzMiy00J:www.microvation.org/index.php%3Foption%3Dcom_content%26view%3Darticle%26id%3D27:man-asks-stupid-question%26catid%3D12%26Itemid%3D106+&cd=1&hl=en&ct=clnk&gl=us&client=firefox-a
Thanks for the reference!
Here's part of the W article:
In a variety of computer languages, the function atan2 is the arctangent function with two arguments. The purpose of using two arguments instead of one is to gather information on the signs of the inputs in order to return the appropriate quadrant of the computed angle, which is not possible for the single-argument arctangent function.
For any real number (e.g., floating point) arguments x and y not both equal to zero, atan2(y, x) is the angle in radians between the positive x-axis of a plane and the point given by the coordinates (x, y) on it. The angle is positive for counter-clockwise angles (upper half-plane, y > 0), and negative for clockwise angles (lower half-plane, y < 0).
Prob. the Oracle doc should mention that the arguments are not tan values but coordinates; it does mention that specifying the two arguments enables the quadrant of the resulting angle to be determined.
Anyway thx for your replies! An interesting excursion into math. Received on Wed May 14 2014 - 14:58:17 CEST