module

Alea::PRNG(S32, S64)

Alea::PRNG is the module all PRNGs include in order to work with Alea::Random.

As long as it includes the Alea::PRNG module, you can build your own generator: check out the example provided in the documentation to make it a valid extension for Alea::Random.

Constructors

new(seed32 : S32, seed64 : S64)

Must initialize states from seeds.

Source

Instance methods

next_f32

Generate a uniform-distributed random Float32 in [0, 1).

Source
next_f64

Generate a uniform-distributed random Float64 in [0, 1).

Source
next_i32

Generate a uniform-distributed random Int32 in range Int32::MIN..Int32::MAX.

Source
next_i64

Generate a uniform-distributed random Int64 in range Int64::MIN..Int64::MAX.

Source
next_u32

Must return an uniform-distributed UInt32.

Source
next_u64

Must return an uniform-distributed UInt64.

Source