rndGen

Global random number generator used by various functions in this module whenever no generator is specified. It is allocated per-thread and initialized to an unpredictable value for each thread.

@property ref @safe nothrow @nogc
rndGen
()

Return Value

Type: Random

A singleton instance of the default random number generator

Examples

import std.algorithm.iteration : sum;
import std.range : take;
auto rnd = rndGen;
assert(rnd.take(3).sum > 0);

Meta