Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

simple_random_provider

🌌simple_random_provider

simple random number provider for pseudo random numbers that are not safe
for security and that do not meet typical requirements for a good
random number generator.

get current random number

redefines Random_Provider.get:
Return the random number stored in this instance of Random_Provider, in the
range 0..u64.max

NOTE: this feature is pure, i.e., repeated calls on the same target result
in equal results. Use 'next' to get different results.

get next instance by shuffling bits in seeds around

redefines Random_Provider.next:
create a new instance of Random_Provider containing a new state. Depending
on the qualifity of this random number generator, this might be a simple
function of the original Random_Provider or it might use an external source
of entropy to create a new instance.