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 2018/02/02 13:28:57 UTC

[02/50] commons-numbers git commit: NUMBERS-48: Dead code has been removed

NUMBERS-48: Dead code has been removed


Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/16322d83
Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/16322d83
Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/16322d83

Branch: refs/heads/feature__NUMBERS-51__field
Commit: 16322d83ab3092e93a1e2d7f576b185682c16f69
Parents: dc43084
Author: Eric Barnhill <er...@apache.org>
Authored: Wed Sep 13 15:16:46 2017 +0200
Committer: Eric Barnhill <er...@apache.org>
Committed: Wed Sep 13 15:16:46 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/commons/numbers/complex/Complex.java | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/16322d83/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
----------------------------------------------------------------------
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
index 5470d5e..71a4220 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
@@ -184,9 +184,6 @@ public class Complex implements Serializable  {
      */
     public double abs() {
         if (Math.abs(real) < Math.abs(imaginary)) {
-            if (imaginary == 0.0) {
-                return Math.abs(real);
-            }
             final double q = real / imaginary;
             return Math.abs(imaginary) * Math.sqrt(1 + q * q);
         } else {