rand

Returns a random variate of type T from an optional generator or the default one. (community summary)

Return Value

Type: T

Uniformly distributed integer for interval [T.min .. T.max].

Examples

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