@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
10 lines • 458 B
TypeScript
/**
* Picks element with highest score from the array using supplied scoring function.
* If multiple elements with the same highest score exist, the result will be first such encountered element
* @template T
* @param {T[]} array
* @param {function(el:T, index:number):number} scoreFunction
* @returns {T|undefined}
*/
export function array_pick_best_element<T>(array: T[], scoreFunction: any): T;
//# sourceMappingURL=array_pick_best_element.d.ts.map