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/trunk@1074295 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2011-02-24 21:19:33 +00:00
parent ae6762b2a7
commit 745bc49daf

View File

@ -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