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 2011/01/17 23:39:09 UTC

svn commit: r1060117 - /commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/MathUtils.java

Author: erans
Date: Mon Jan 17 22:39:08 2011
New Revision: 1060117

URL: http://svn.apache.org/viewvc?rev=1060117&view=rev
Log:
MATH-481
Made Javadoc agree with code.

Modified:
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/MathUtils.java

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=1060117&r1=1060116&r2=1060117&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/MathUtils.java Mon Jan 17 22:39:08 2011
@@ -583,27 +583,27 @@ public final class MathUtils {
     
     
     /**
-     * Returns true iff they are equal as defined by
-     * {@link #equals(double,double,int) this method}.
+     * Returns true iff they are strictly equal.
      *
      * @param x first value
      * @param y second value
      * @return {@code true} if the values are equal.
      * @deprecated This method considers that {@code NaN == NaN}. In release
      * 3.0, the semantics will change in order to comply with IEEE754 where it
-     * is specified that {@code NaN != NaN}.
-     * New methods have been added for those cases wher the old semantics is
-     * useful (see e.g. {@link #equalsIncludingNaN(double,double)
-     * equalsIncludingNaN}.
+     * is specified that {@code NaN != NaN}. Also, two adjacent floating point
+     * numbers will be considered equal.
+     * New methods have been added for those cases where the old semantics
+     * (w.r.t. NaN) is useful (see e.g.
+     * {@link #equalsIncludingNaN(double,double) equalsIncludingNaN}.
      */
     @Deprecated
-public static boolean equals(double x, double y) {
-    return (Double.isNaN(x) && Double.isNaN(y)) || x == y;
-}
+        public static boolean equals(double x, double y) {
+        return (Double.isNaN(x) && Double.isNaN(y)) || x == y;
+    }
 
     /**
      * Returns true if both arguments are NaN or neither is NaN and they are
-     * equal as defined by {@link #equals(double,double) this method}.
+     * equal as defined by {@link #equals(double,double,int) equals(x, y, 1)}.
      *
      * @param x first value
      * @param y second value