roll-parser - v3.0.0-beta.0
    Preparing search index...

    Class SeededRNG

    Seedable pseudo-random number generator using xorshift128.

    Produces reproducible sequences from identical seeds. Period: 2^128 - 1

    // Same seed = same sequence
    const rng1 = new SeededRNG('test-seed');
    const rng2 = new SeededRNG('test-seed');
    rng1.nextInt(1, 6) === rng2.nextInt(1, 6); // true

    Implements

    Index
    • Returns a random floating-point number in the range [0, 1).

      Returns number

    • Returns a random integer in the inclusive range [min, max].

      Parameters

      • min: number

        Minimum value (inclusive)

      • max: number

        Maximum value (inclusive)

      Returns number