Rng::seeded
pub static fn seeded(int seed) -> Rng Import
Source: use random::{Rng}; src/random.hy Creates a generator from seed. A seed of 0 is treated as 1.
Parameters#
| Name | Type |
|---|---|
seed | int |
Returns#
Rng
See also#
Rng: A seeded pseudo-random number generator.Rng::from_time: Creates a generator seeded from the current wall-clock and monotonic time (via coil-time).Rng::next_u64: Returns the next raw value from the generator, a non-negativeint.Rng::range: Returns a value inlo..hi(includinglo, excludinghi), orlowhenhi <= lo.Rng::float: Returns afloatin0.0..1.0.Rng::bytes: Returnsnpseudo-random bytes (none whenn <= 0).