(optional) random number generator to use; if not specified, defaults to rndGen
Random variate drawn from the uniform distribution across all possible values of the integral, character or enum type T.
auto rnd = MinstdRand0(42); assert(rnd.uniform!ubyte == 102); assert(rnd.uniform!ulong == 4838462006927449017); enum Fruit { apple, mango, pear } version (D_LP64) // https://issues.dlang.org/show_bug.cgi?id=15147 assert(rnd.uniform!Fruit == Fruit.mango);
Generates a uniformly-distributed number in the range [T.min, T.max] for any integral or character type T. If no random number generator is passed, uses the default rndGen.
If an enum is used as type, the random variate is drawn with equal probability from any of the possible values of the enum E.