commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1581389 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMath.java
Date Tue, 25 Mar 2014 15:57:18 GMT
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



Mime
View raw message