From 150f37649d73ae1fd4b1e59a9f3c324f8d2953b6 Mon Sep 17 00:00:00 2001 From: Infendro Date: Mon, 4 Aug 2025 13:29:10 +0200 Subject: [PATCH] fix parameter name --- src/commonMain/kotlin/com/infendro/random/PRNG.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commonMain/kotlin/com/infendro/random/PRNG.kt b/src/commonMain/kotlin/com/infendro/random/PRNG.kt index 1198c2c..7729ef0 100644 --- a/src/commonMain/kotlin/com/infendro/random/PRNG.kt +++ b/src/commonMain/kotlin/com/infendro/random/PRNG.kt @@ -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 {