The OpenD Programming Language

randIndex

Parameters

m T

positive module

Return Value

Type: T

Uniformly distributed integer for interval [0 .. m$(RPAREN).

Examples

auto s = randIndex(100u);
auto n = randIndex!ulong(-100);
import mir.random;
import mir.random.engine.xorshift;
auto gen = Xorshift(1);
auto s = gen.randIndex!uint(100);
auto n = gen.randIndex!ulong(-100);

Meta