Improved javadoc for nextAfter.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@419099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0303fffa15
commit
ac13472bb0
|
@ -474,13 +474,20 @@ public final class MathUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the closest machine representable number
|
* Get the next machine representable number after a number, moving
|
||||||
* from a number in some direction.
|
* in the direction of another number.
|
||||||
|
* <p>
|
||||||
|
* If <code>direction</code> is greater than or equal to<code>d</code>,
|
||||||
|
* the smallest machine representable number strictly greater than
|
||||||
|
* <code>d</code> is returned; otherwise the largest representable number
|
||||||
|
* strictly less than <code>d</code> is returned.
|
||||||
|
* <p>
|
||||||
|
* If <code>d</code> is NaN or Infinite, it is returned unchanged.
|
||||||
|
*
|
||||||
* @param d base number
|
* @param d base number
|
||||||
* @param direction (the only important thing is whether
|
* @param direction (the only important thing is whether
|
||||||
* direction is greater or smaller than d)
|
* direction is greater or smaller than d)
|
||||||
* @return
|
* @return the next machine representable number in the specified direction
|
||||||
*/
|
*/
|
||||||
public static double nextAfter(double d, double direction) {
|
public static double nextAfter(double d, double direction) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue