nextAfter
Returns the floating-point number adjacent to the first argument in the direction of the second argument. If both arguments compare as equal the second argument is returned.
Special cases:
If either argument is a NaN, then NaN is returned.
If both arguments are signed zeros,
directionis returned unchanged (as implied by the requirement of returning the second argument if the arguments compare as equal).If
startis Double.MIN_VALUE anddirectionhas a value such that the result should have a smaller magnitude, then a zero with the same sign asstartis returned.If
startis infinite anddirectionhas a value such that the result should have a smaller magnitude, Double.MAX_VALUE with the same sign asstartis returned.If
startis equal to Double.MAX_VALUE anddirectionhas a value such that the result should have a larger magnitude, an infinity with same sign asstartis returned.
Return
The floating-point number adjacent to start in the direction of direction.
Since
1.6
Parameters
starting floating-point value
value indicating which of start's neighbors or start should be returned
Returns the floating-point number adjacent to the first argument in the direction of the second argument. If both arguments compare as equal a value equivalent to the second argument is returned.
Special cases:
If either argument is a NaN, then NaN is returned.
If both arguments are signed zeros, a value equivalent to
directionis returned.If
startis Float.MIN_VALUE anddirectionhas a value such that the result should have a smaller magnitude, then a zero with the same sign asstartis returned.If
startis infinite anddirectionhas a value such that the result should have a smaller magnitude, Float.MAX_VALUE with the same sign asstartis returned.If
startis equal to Float.MAX_VALUE anddirectionhas a value such that the result should have a larger magnitude, an infinity with same sign asstartis returned.
Return
The floating-point number adjacent to start in the direction of direction.
Since
1.6
Parameters
starting floating-point value
value indicating which of start's neighbors or start should be returned