The OpenD Programming Language

SplitMixEngine.opCall

Advances the random sequence.

  1. ulong opCall()
  2. ulong opCall()
    struct SplitMixEngine(alias mixer, bool split_enabled = false, OptionalArgs...)
    @nogc nothrow pure @safe shared
    ulong
    opCall
    ()
    ()
    if (
    (
    __traits(compiles, ) ||
    __traits(compiles, )
    )
    &&
    (
    OptionalArgs.length < 1 ||
    (
    is(typeof(OptionalArgs[1]) == ulong) &&
    OptionalArgs[1] != DEFAULT_SPLITMIX_INCREMENT
    )
    )
    &&
    OptionalArgs.length < 2
    )

Examples

auto rnd = SplitMixEngine!staffordMix13(1);
assert(rnd() == staffordMix13(1 + GOLDEN_GAMMA));

Meta