A transactional pseudo-random number generator which
behaves numerically like java.util.Random
.
- Companion
- object
Value members
Abstract methods
Generates a random Double
value, uniformly distributed
between 0.0
(inclusive) and 1.0
(exclusive).
Generates a random Double
value, uniformly distributed
between 0.0
(inclusive) and 1.0
(exclusive).
Generates a random Float
value, uniformly distributed
between 0.0f
(inclusive) and 1.0f
(exclusive).
Generates a random Float
value, uniformly distributed
between 0.0f
(inclusive) and 1.0f
(exclusive).
Generates a random Int
value in the range Int.MinValue
to Int.MaxValue
.
Generates a random Int
value in the range Int.MinValue
to Int.MaxValue
.
Generates a random Int
value in the range of 0 (inclusive) until the specified value n
(exclusive).
Generates a random Int
value in the range of 0 (inclusive) until the specified value n
(exclusive).
Generates a random Long
value in the range Long.MinValue
to Long.MaxValue
.
Generates a random Long
value in the range Long.MinValue
to Long.MaxValue
.
WARNING:
Because it uses the same algorithm as java.util.Random
, with a seed of only 48 bits,
this function will not return all possible long values!
Resets the internal seed value to the given argument. This is a raw seed value
as obtained from getRawSeed
. For user operation, use setSeed
instead,
which further scrambles the seed value.
Resets the internal seed value to the given argument. This is a raw seed value
as obtained from getRawSeed
. For user operation, use setSeed
instead,
which further scrambles the seed value.