MCPcopy Create free account
hub / github.com/davidgiven/luje / next

Method next

lib/java/util/Random.java:95–98  ·  view source on GitHub ↗

Returns a pseudo-random uniformly distributed int value of the number of bits specified by the argument bits as described by Donald E. Knuth in The Art of Computer Programming, Volume 2: Seminumerical Algorithms , section 3.2.1. @param bits number of bits of the ret

(int bits)

Source from the content-addressed store, hash-verified

93 * @see #nextLong
94 */
95 protected synchronized int next(int bits) {
96 seed = (seed * multiplier + 0xbL) & ((1L << 48) - 1);
97 return (int) (seed >>> (48 - bits));
98 }
99
100 /**
101 * Returns the next pseudo-random, uniformly distributed {@code boolean} value

Callers 5

nextBooleanMethod · 0.95
nextDoubleMethod · 0.95
nextFloatMethod · 0.95
nextIntMethod · 0.95
nextLongMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected