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:
Phil Steitz 2006-07-04 21:01:10 +00:00
parent 0303fffa15
commit ac13472bb0
1 changed files with 11 additions and 4 deletions

View File

@ -474,13 +474,20 @@ public final class MathUtils {
}
/**
* Get the closest machine representable number
* from a number in some direction.
* Get the next machine representable number after a number, moving
* 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 direction (the only important thing is whether
* 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) {