MATH-481
Made Javadoc agree with code. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1060117 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
94138d5014
commit
1775178509
|
@ -583,27 +583,27 @@ public final class MathUtils {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true iff they are equal as defined by
|
* Returns true iff they are strictly equal.
|
||||||
* {@link #equals(double,double,int) this method}.
|
|
||||||
*
|
*
|
||||||
* @param x first value
|
* @param x first value
|
||||||
* @param y second value
|
* @param y second value
|
||||||
* @return {@code true} if the values are equal.
|
* @return {@code true} if the values are equal.
|
||||||
* @deprecated This method considers that {@code NaN == NaN}. In release
|
* @deprecated This method considers that {@code NaN == NaN}. In release
|
||||||
* 3.0, the semantics will change in order to comply with IEEE754 where it
|
* 3.0, the semantics will change in order to comply with IEEE754 where it
|
||||||
* is specified that {@code NaN != NaN}.
|
* is specified that {@code NaN != NaN}. Also, two adjacent floating point
|
||||||
* New methods have been added for those cases wher the old semantics is
|
* numbers will be considered equal.
|
||||||
* useful (see e.g. {@link #equalsIncludingNaN(double,double)
|
* New methods have been added for those cases where the old semantics
|
||||||
* equalsIncludingNaN}.
|
* (w.r.t. NaN) is useful (see e.g.
|
||||||
|
* {@link #equalsIncludingNaN(double,double) equalsIncludingNaN}.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static boolean equals(double x, double y) {
|
public static boolean equals(double x, double y) {
|
||||||
return (Double.isNaN(x) && Double.isNaN(y)) || x == y;
|
return (Double.isNaN(x) && Double.isNaN(y)) || x == y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if both arguments are NaN or neither is NaN and they are
|
* 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 x first value
|
||||||
* @param y second value
|
* @param y second value
|
||||||
|
|
Loading…
Reference in New Issue