fix parameter name

This commit is contained in:
2025-08-04 13:29:10 +02:00
parent 02eaa9ec59
commit 150f37649d

View File

@@ -18,12 +18,12 @@ abstract class PRNG : Random() {
): ByteArray
override fun nextBits(
count: Int,
bitCount: Int,
): Int {
if (count !in 0..32) throw Exception()
if (count == 0) return 0
if (bitCount !in 0..32) throw Exception()
if (bitCount == 0) return 0
return generate(4).toInt() ushr (32 - count)
return generate(4).toInt() ushr (32 - bitCount)
}
companion object {