fixed a nasty bug with atan2 that occurred only with some Java 1.5 virtual machines
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1074294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
099ba74e92
commit
f7da7733e6
|
@ -3046,8 +3046,8 @@ public class FastMath {
|
|||
rb = -(temp - ra - rb);
|
||||
ra = temp;
|
||||
|
||||
if (ra == 0 && (y < 0)) { // Fix up the sign so atan works correctly
|
||||
ra = -0.0;
|
||||
if (ra == 0) { // Fix up the sign so atan works correctly
|
||||
ra = copySign(0.0, y);
|
||||
}
|
||||
|
||||
// Call atan
|
||||
|
|
Loading…
Reference in New Issue