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

simpleRandomProvider

🌌simpleRandomProvider

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 randomProvider.get:
Return the random number stored in this instance of randomProvider, 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 randomProvider.next:
create a new instance of randomProvider containing a new state. Depending
on the qualifity of this random number generator, this might be a simple
function of the original randomProvider or it might use an external source
of entropy to create a new instance.