MultiLoader-Template/node_modules/es-toolkit/dist/math/mean.d.ts
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

17 lines
440 B
TypeScript

/**
* Calculates the average of an array of numbers.
*
* If the array is empty, this function returns `NaN`.
*
* @param {number[]} nums - An array of numbers to calculate the average.
* @returns {number} The average of all the numbers in the array.
*
* @example
* const numbers = [1, 2, 3, 4, 5];
* const result = mean(numbers);
* // result will be 3
*/
declare function mean(nums: readonly number[]): number;
export { mean };