Merge branch '1.21' into new-container-api
This commit is contained in:
commit
7405989b97
@ -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" }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user