MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / nextDown

Method nextDown

Ports/CLDC11/src/java/lang/Math.java:209–224  ·  view source on GitHub ↗
(double d)

Source from the content-addressed store, hash-verified

207 }
208
209 public static double nextDown(double d) {
210 if (Double.isNaN(d)) {
211 return d;
212 }
213 if (d == Double.NEGATIVE_INFINITY) {
214 return d;
215 }
216 long bits = Double.doubleToLongBits(d);
217 boolean negative = (bits & (1L << 63)) != 0;
218 if (negative) {
219 bits++;
220 } else {
221 bits--;
222 }
223 return Double.longBitsToDouble(bits);
224 }
225
226
227 public static double nextAfter(double start, double direction) {

Callers 1

nextDoubleMethod · 0.95

Calls 3

isNaNMethod · 0.95
doubleToLongBitsMethod · 0.95
longBitsToDoubleMethod · 0.95

Tested by

no test coverage detected