std::prng
This module contains utilities for generating pseudorandom numbers using the xoshiro256**
algorithm.
The modulelevel functions use a global generator initialized with a random seed.
To generate a repeatable sequence of pseudorandom numbers, use a Generator
instance with a known seed.
Functions

rand_float() > f64

Returns a uniformlydistributed random float from the halfopen interval
[0.0, 1.0)
— i.e. the interval from zero up to but not including1.0
. 
rand_int(n: i64) > i64

Returns a uniformlydistributed random integer from the halfopen interval
[0, n)
— i.e. the interval from zero up to but not includingn
, wheren
is a positive integer.
Classes

Generator() > Generator

Returns a new pseudorandom number generator. The generator is automatically initialized with a random seed.
Generator
instances support the following methods:

:rand_float() > f64

Returns a uniformlydistributed random float from the halfopen interval
[0.0, 1.0)
— i.e. the interval from zero up to but not including1.0
. 
:rand_int(n: i64) > i64

Returns a uniformlydistributed random integer from the halfopen interval
[0, n)
— i.e. the interval from zero up to but not includingn
, wheren
is a positive integer. 
:seed(n: i64)

Seeds the generator using the number
n
.