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)
| 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 |
no outgoing calls
no test coverage detected