Class π°
Pseudo-random number generator. The default implementation relies on the Mersenne Twister algorithm.
Initializers
π
π
Creates a new generator and seeds it with a random value, if possible using hardware entropy.
Methods
π’βοΈ
βοΈ π’ a π’ b π’ β‘οΈ π’
Generates an integer. Integers are uniformly distributed on the closed interval [a, b]
.
π―βοΈ
βοΈ π― β‘οΈ π―
Generates a real, where reals are uniformly distributed on the interval [0, 1)
.
deinitβοΈ
βοΈ deinit