average method
Returns the average value (arithmetic mean) of all elements.
Example:
[2.0, 4.0, 6.0, 8.0].average(); // 5.0
Implementation
double? average() => averageBy((n) => n);
Returns the average value (arithmetic mean) of all elements.
Example:
[2.0, 4.0, 6.0, 8.0].average(); // 5.0
double? average() => averageBy((n) => n);