From 5c70086611bca0da6879b569f97d116b666b890e Mon Sep 17 00:00:00 2001 From: Gilles Sadowski Date: Tue, 25 Mar 2014 15:57:18 +0000 Subject: [PATCH] "final" keyword. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1581389 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/math3/util/FastMath.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/math3/util/FastMath.java b/src/main/java/org/apache/commons/math3/util/FastMath.java index 913929e65..afa78d9f7 100644 --- a/src/main/java/org/apache/commons/math3/util/FastMath.java +++ b/src/main/java/org/apache/commons/math3/util/FastMath.java @@ -2432,17 +2432,18 @@ public class FastMath { * @return atan(xa + xb) (or angle shifted by {@code PI} if leftPlane is true) */ private static double atan(double xa, double xb, boolean leftPlane) { - boolean negate = false; - if (xa == 0.0) { // Matches +/- 0.0; return correct sign return leftPlane ? copySign(Math.PI, xa) : xa; } + final boolean negate; if (xa < 0) { // negative xa = -xa; xb = -xb; negate = true; + } else { + negate = false; } if (xa > 1.633123935319537E16) { // Very large input