Function randomSuffix

  • Pick an arbitrary suffix.

    Type Parameters

    • T

    Parameters

    • x: T[]

      an array

    • n: number = -1

      number of values [-1 ⇒ any]

    • fr: ReadFunction<number> = Math.random

      random number generator ([0, 1))

    Returns T[]

    x[|x|-i..] if n<0; x[|x|-n..] otherwise | i ∈ 0..|x|

Generated using TypeDoc