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

    Function keyedRandom

    • A value keyed by where it is wanted rather than by when it was asked for — the same key always gives the same value.

      Parameters

      • seed: number

        Any integer, and the widest part — it may exceed 32 bits. Distinct seeds give unrelated values for the same key.

      • keyA: number

        A part of the key.

      • keyB: number

        A part of the key.

      • keyC: number

        A part of the key.

      • keyD: number

        The narrowest part of the key, e.g. a counter within the rest.

      Returns number

      A number in [0, 1).

      A sequence hands each caller the value its turn earned, so reproducing the values means reproducing the order. Keying takes the order out of the answer: the same key gives the same value however many other values were drawn first, on any machine.

      Values carry the full 53 bits of a double, as Math.random does. The parts of the key are mixed, not concatenated, so any of them may be small, sparse or repeated.

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