Method in random · Rng coil-stdlib

Rng::float

pub fn float() -> float
Import
use random::{Rng};
Source: src/random.hy

Returns a float in 0.0..1.0.

Called on a Rng value as value.float(…).

Returns#

float

See also#

  • float
  • Rng: A seeded pseudo-random number generator.
  • Rng::seeded: Creates a generator from seed.
  • 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::bytes: Returns n pseudo-random bytes (none when n <= 0).
↑ ↓ navigate ↵ open