uniform01

fnT uniform01(T = double)() if (isFloatingPoint!T)

Generates a uniformly-distributed floating point number of type T in the range [0, 1). If no random number generator is specified, the default RNG rndGen will be used as the source of randomness.

uniform01 offers a faster generation of random variates than the equivalent uniform!"[)"(0.0, 1.0) and so may be preferred for some applications.

Parameters

rng(optional) random number generator to use; if not specified, defaults to rndGen

Returns

Floating-point random variate of type T drawn from the _uniform

distribution across the half-open interval [0, 1).

fnT uniform01(T = double, UniformRNG)(ref UniformRNG rng) if (isFloatingPoint!T && isUniformRNG!UniformRNG)

ditto