UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

12 lines 632 B
/** * Pick multiple random items from an array * * @template T * @param {function} random random function, must return a value between 0 and 1 * @param {T[]} source Where to pick elements from * @param {T[]} target Where to place picked elements * @param {number} count how many items to pick, if this number is greater than the length of {@link source}, it will be limited to length of {@link source} instead * @returns {number} number of picked elements */ export function randomMultipleFromArray<T>(random: Function, source: T[], target: T[], count: number): number; //# sourceMappingURL=randomMultipleFromArray.d.ts.map