The OpenD Programming Language

rand

Parameters

gen G

saturated random number generator

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;

Meta