Expand description
Pseudo-random number generator crate.
NOT FOR CRYPTOGRAPHIC PURPOSES.
Using This Crate
- Create a PCG32 or PCG32K value as your generator.
- If you enable this crate’s
getrandom
cargo feature then both types will have constructor functions to handle seeding a generator from the getrandom function.
- If you enable this crate’s
- Call
next_u32
on the generator to get pseudo-randomu32
values. - At your option, import the Gen32 trait for various extension methods.
Modules
- Base formulas used elsewhere in the crate.
Structs
- Allows sampling a
u16
number in0 .. N
. - Allows sampling a
u32
number in0 .. N
. - A Permuted Congruential Generator with 32-bit output.
- A Permuted Congruential Generator with 32-bit output, extended to
K
dimensions.
Traits
- A trait for pseudo-random number generators with 32-bit output per step.