UNPKG

910 BTypeScriptView Raw
1import { MathOptions } from './mathoptions';
2/**
3 * Computes the average of the iterable sequence.
4 *
5 * @export
6 * @param {Iterable<number>} source The source iterable sequence to compute the average.
7 * @param {MathOptions<number>} [options] The options for calculating the average.
8 * @returns {number} The computed average for the iterable sequence.
9 */
10export declare function average(source: Iterable<number>, options?: MathOptions<number>): number;
11/**
12 * Computes the average of the iterable sequence.
13 *
14 * @export
15 * @template T The type of elements in the source sequence.
16 * @param {Iterable<T>} source The source iterable sequence to compute the average.
17 * @param {MathOptions<T>} [options] The options for calculating the average.
18 * @returns {number} The computed average for the iterable sequence.
19 */
20export declare function average<T>(source: Iterable<T>, options?: MathOptions<T>): number;