module watt.io.seed
Get a random 32 bit number from the Operating System.
This number is ideal for seeding random number generators, such as Watt's very own watt.math.random.
Code Map
//! Get a random 32 bit number from the Operating System.
module watt.io.seed;
//! Get a random unsigned 32 bit integer.
fn getHardwareSeedU32() u32 { }
fn getHardwareSeedU32() u32
Get a random unsigned 32 bit integer.
This is sourced from the hardware or a strong source provided by the Operating System, where possible. Intended to be used for random number generator seed values.
Example
gen: RandomGenerator;
gen.seed(getHardwareSeedU32());