You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2014/03/25 16:57:18 UTC

svn commit: r1581389 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMath.java

Author: erans
Date: Tue Mar 25 15:57:18 2014
New Revision: 1581389

URL: http://svn.apache.org/r1581389
Log:
"final" keyword.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMath.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMath.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMath.java?rev=1581389&r1=1581388&r2=1581389&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMath.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMath.java Tue Mar 25 15:57:18 2014
@@ -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