From 140bdab59c5c909f9cb0497e308600b04d5216ec Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 26 Mar 2025 22:21:02 +0700 Subject: [PATCH] Fix swapped out condition checks in nextDecimal --- src/main/kotlin/ru/dbotthepony/mc/otm/core/RandomUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/RandomUtils.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/RandomUtils.kt index 38dd8b17e..cf7da7c9a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/RandomUtils.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/RandomUtils.kt @@ -161,9 +161,9 @@ class RandomByteSource(private val source: RandomSource) { */ fun RandomSource.nextDecimal(bound: Decimal, round: Boolean = false): Decimal { if (round) - require(bound > Decimal.ZERO) { "Bound must be positive, $bound given" } - else require(bound >= Decimal.ONE) { "Bound must be 1 or bigger, $bound given" } + else + require(bound > Decimal.ZERO) { "Bound must be positive, $bound given" } require(bound.isFinite) { "Bound must be finite" }