mean
Import from @varavel/vdl-plugin-sdk/utils/math.
Calculates the average of an array of numbers.
If the array is empty, this function returns NaN.
Parameters
| Parameter | Type | Description |
|---|---|---|
nums |
readonly number[] |
An array of numbers to calculate the average. |
Returns
number
The average of all the numbers in the array.