from<N extends num> static method
Implementation
static ScaleNum? from<N extends num>(Iterable<N>? list) {
if (list == null || list.isEmpty) return null;
num min = list.first;
var max = min;
for (var n in list) {
if (n < min) {
min = n;
}
if (n > max) {
max = n;
}
}
return ScaleNum(min, max);
}