nextBits

Common
JVM
JS
Native
1.0
abstract fun nextBits(bitCount: Int): Int
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.