rand

Generates a random value of type T using an optional generator G. (community summary)

Parameters

gen G*

saturated random number generator

Return Value

Type: bool

Uniformly distributed boolean.

Examples

auto s = rand!bool;
import mir.random.engine.xorshift;
auto gen = Xorshift(1);
auto s = gen.rand!bool;