Struct agb::rng::RandomNumberGenerator
source · pub struct RandomNumberGenerator { /* private fields */ }
Expand description
A fast pseudo-random number generator. Note that the output of the random number generator for a given seed is guaranteed stable between minor releases, however could change in a major release.
Implementations§
source§impl RandomNumberGenerator
impl RandomNumberGenerator
sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a new random number generator with a fixed seed
Note that this seed is guaranteed to be the same between minor releases.
sourcepub const fn new_with_seed(seed: [u32; 4]) -> Self
pub const fn new_with_seed(seed: [u32; 4]) -> Self
Produces a random number generator with the given initial state / seed. None of the values can be 0.