-
Notifications
You must be signed in to change notification settings - Fork 7
Utils.Function.getMedian
Christian d'Heureuse edited this page Sep 25, 2026
·
1 revision
commons-math-interpolation / Utils / getMedian
function getMedian(a): number;Defined in: Utils.ts:206
Returns the median of an array of numbers.
If the number of values is even, the mean of the two middle values is returned. The passed array is not modified.
ArrayLike<number>
The values. They should not contain NaN, otherwise the result is meaningless.
number
The median, or NaN if the array is empty.