-
-
Notifications
You must be signed in to change notification settings - Fork 485
Closed
Description
Recommendation
I'd suggest adding some more context to:
https://docs.rs/rand/0.4.2/rand/trait.SeedableRng.html
Currently, it says:
Create a new RNG with the given seed.
Example
...
I'd suggest adding text so that it looks more like this:
Create a new RNG with the given seed.
Note: the seed varies based on the chosen generator. Most RNG's
expect `&'a [u32]` values but some expect `&'a [u64]`. Please refer to
the particular RNG documentation for the length of the seed.
Example
...
Motivation
When I first looked into how seeds worked in this library, I tried to find a definition of Seed to get some clarity. That didn't help much, since Seed is a generic for the SeedableRng trait.
pub trait SeedableRng<Seed>: Rng {
fn reseed(&mut self, Seed);
fn from_seed(seed: Seed) -> Self;
}
Particularly for people new to the library, saying a few words about what a Seed is may help.
Metadata
Metadata
Assignees
Labels
No labels