ixfx
    Preparing search index...

    Function mulberrySource

    • Generates deterministic pseudo-random numbers using the mulberry32 technique. Uses 0 (inclusive)...1 (exclusive) scale like ``ath.random()`.

      By default it uses a fixed seed, so each time it's used it always produces the same sequence of random values.

      // Get the function
      const r = mulberrySource();

      // Generate a number
      r(); // 0..1

      To create a more properly random source, use the time as the seed:

      const r = mulberrySource(Date.now());
      

      Parameters

      • seed: number = 123456789

      Returns () => number