IterableNumberExtension extension

Extensions that apply to iterables of numbers.

Specialized version of some extensions of IterableComparableExtension since doubles require special handling of double.nan.

on

Properties

average double
The arithmetic mean of the elements of a non-empty iterable.
no setter
max num
A maximal element of the iterable.
no setter
maxOrNull num?
A maximal element of the iterable, or null if the iterable is empty.
no setter
min num
A minimal element of the iterable.
no setter
minOrNull num?
A minimal element of the iterable, or null it the iterable is empty.
no setter
sum num
The sum of the elements.
no setter