Documentation for math.atan2() can be improved.
July 14, 2010
7:49 a.m.
Hullo, The documentation for math.atan2( y, x ) says: --------8<-------- The point of atan2() is that the signs of both inputs are known to it, so it can compute the correct quadrant for the angle. --------8<-------- This is correct, but incomplete. Another big advantage of using atan2() is that it works perfectly in the regime where x, the denominator, is close to, or equal to zero. While atan() will fail for x == 0, and may give inaccurate answers for x~= 0, atan2() should work fine. Thanks, Niraj
5813
Age (days ago)
5813
Last active (days ago)
0 comments
1 participants
participants (1)
-
Niraj Dudani