Associated function in random · Rng coil-stdlib

Rng::seeded

pub static fn seeded(int seed) -> Rng
Import
use random::{Rng};
Source: src/random.hy

Creates a generator from seed. A seed of 0 is treated as 1.

Parameters#

NameType
seedint

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-negative int.
  • Rng::range: Returns a value in lo..hi (including lo, excluding hi), or lo when hi <= lo.
  • Rng::float: Returns a float in 0.0..1.0.
  • Rng::bytes: Returns n pseudo-random bytes (none when n <= 0).
↑ ↓ navigate ↵ open