mirror of
https://github.com/apache/commons-math.git
synced 2025-02-09 03:25:31 +00:00
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:
parent
ae6762b2a7
commit
745bc49daf
@ -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…
x
Reference in New Issue
Block a user