Testing module

rng_unit

procedureextensionsince 0.30.0Source

A number from 0 up to, not including, 1.

Example↗
rng := rng_seeded(1);
x := rng_unit(*rng);
assert(x >= 0 && x < 1);
rng_unit :: (rng: *Rng) -> float64

A number from 0 up to, not including, 1.

Parameters

rng: *Rng
the generator to draw from.

Returns

float64
Example↗
rng := rng_seeded(1);
x := rng_unit(*rng);
assert(x >= 0 && x < 1);

See also