Preparing search index...

    Function pickByIndex

    • Deterministically picks an element from a non-empty array by index/salt.

      Type Parameters

      • T

        Element type of the pool.

      Parameters

      • pool: readonly T[]

        Non-empty array to pick from.

      • index: number

        Entity index.

      • salt: number

        Field-specific offset.

      Returns T

      One element of pool.