commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [27/31] commons-numbers git commit: Removed methods that do not belong in class "Complex".
Date Fri, 20 Jan 2017 14:46:14 GMT
Removed methods that do not belong in class "Complex".

Similar methods are defined in class "Precision" (module "commons-numbers-core").


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

Branch: refs/heads/master
Commit: b797559e4141da1f649f0594c28b06ce6b338bcb
Parents: 539279c
Author: Gilles Sadowski <gilles@harfang.homelinux.org>
Authored: Fri Jan 20 15:09:22 2017 +0100
Committer: Gilles Sadowski <gilles@harfang.homelinux.org>
Committed: Fri Jan 20 15:09:22 2017 +0100

----------------------------------------------------------------------
 .../apache/commons/numbers/complex/Complex.java | 41 --------------------
 1 file changed, 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/b797559e/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 1d864e6..b130558 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
@@ -1314,47 +1314,6 @@ public class Complex implements Serializable  {
 	    return new Double(x).equals(new Double(y));
 	}
 
-	/**
-     * Returns {@code true} if there is no double value strictly between the
-     * arguments or the difference between them is within the range of allowed
-     * error (inclusive). Returns {@code false} if either of the arguments
-     * is NaN.
-     *
-     * @param x First value.
-     * @param y Second value.
-     * @param eps Amount of allowed absolute error.
-     * @return {@code true} if the values are two adjacent floating point
-     * numbers or they are within range of each other.
-     */
-    public static boolean equals(double x, double y, double eps) {
-        return equals(x, y, 1) || Math.abs(y - x) <= eps;
-    }
-
-
-    /**
-     * Returns {@code true} if there is no double value strictly between the
-     * arguments or the relative difference between them is less than or equal
-     * to the given tolerance. Returns {@code false} if either of the arguments
-     * is NaN.
-     *
-     * @param x First value.
-     * @param y Second value.
-     * @param eps Amount of allowed relative error.
-     * @return {@code true} if the values are two adjacent floating point
-     * numbers or they are within range of each other.
-     * @since 3.1
-     */
-    public static boolean equalsWithRelativeTolerance(double x, double y, double eps) {
-        if (equals(x, y, 1)) {
-            return true;
-        }
-
-        final double absoluteMax = Math.max(Math.abs(x), Math.abs(y));
-        final double relativeDifference = Math.abs((x - y) / absoluteMax);
-
-        return relativeDifference <= eps;
-    }
-
     /**
      * Returns an integer hash code representing the given double value.
      *


Mime
View raw message