SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function createSeededRandom

    • Creates a random source that repeats — the same seed always produces the same sequence.

      Parameters

      • seed: number

        Any integer. Distinct seeds give unrelated sequences.

      Returns () => number

      A function returning a number in [0, 1), drop-in for Math.random.

      Values carry the full 53 bits of a double, as Math.random does.

      Each value comes from the position in the sequence, so a caller reproduces its values only by asking in the same order. Where the order is not fixed, key the draws instead (keyedRandom).

      Not a cryptographic source — never use it for keys, tokens or identifiers.

      const next = createSeededRandom(42);
      next(); // 0.6011037487409305, every time