"Celeste" wrote...
The description of the ATAN2 function in Microsoft Excel help does not
seem 100% accurate to me. It states "ATAN2(a,b) equals ATAN(b/a), except
that a can equal 0 in ATAN2. "
....
Yes, this is inaccurate except for x and y 0.
There are cases in which ATAN(y/x) does not equal ATAN2(x,y), other than
when x = 0. For example, when x = -5 and y =-15, ATAN(-15/-5) = 1.249 and
ATAN2(-5,-15) = -1.89
This has everything to do with quadrants. In this case, the ATAN result is
angularly displaced 180 degrees from the ATAN2 result. The ATAN result is
1.249 radians counterclockwise from the positive X axis, and the ATAN2
result is 1.89 radians clockwise from the positive X axis, which happens to
be 1.249 radians counterclockwise from the negative X axis.
I'm not a math expert, but this description seems misleading to me.
I suggest a description similar to the C++ ATAN2(x,y) function . . .
You're making the understandable but naive assumption anyone within
Microsoft wants to expend any effort or resources fixing their
documentation. This isn't the only place Excel's documentation (aka online
help) is misleading or just plain wrong.
|