source: node_modules/es-toolkit/dist/math/mean.d.mts@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 440 bytes
RevLine 
[a762898]1/**
2 * Calculates the average of an array of numbers.
3 *
4 * If the array is empty, this function returns `NaN`.
5 *
6 * @param {number[]} nums - An array of numbers to calculate the average.
7 * @returns {number} The average of all the numbers in the array.
8 *
9 * @example
10 * const numbers = [1, 2, 3, 4, 5];
11 * const result = mean(numbers);
12 * // result will be 3
13 */
14declare function mean(nums: readonly number[]): number;
15
16export { mean };
Note: See TracBrowser for help on using the repository browser.