nextBits

Common
JVM
JS
Native
1.0
fun nextBits(bitCount: Int): Int

Gets the next random bitCount number of bits.

Generates an Int whose lower bitCount bits are filled with random values and the remaining upper bits are zero.

Parameters

bitCount - number of bits to generate, must be in range 0..32, otherwise the behavior is unspecified.