nextBigInt

fun Random.nextBigInt(from: BigInt, toExclusive: BigInt): BigInt(source)

Generates a random BigInt uniformly distributed between from (inclusive) and the specified toExclusive bound.

Since

2.0.0

Parameters

from

defines the lower bound (inclusive), must be less than toExclusive.

toExclusive

defines the exclusive upper bound.

Throws


fun Random.nextBigInt(toExclusive: BigInt): BigInt(source)

Generates a random BigInt uniformly distributed between 0 (inclusive) and the specified toExclusive bound.

Since

2.0.0

Parameters

toExclusive

defines the exclusive upper bound and must be positive.

Throws

if toExclusive is negative or zero.