max constructor
const
max(])
Compare and return maximum value for up to 10 values, returns double.
Implementation
const max(num a, num b, [num c = double.negativeInfinity, num d = double.negativeInfinity, num e = double.negativeInfinity, num f = double.negativeInfinity, num g = double.negativeInfinity, num h = double.negativeInfinity, num i = double.negativeInfinity, num j = double.negativeInfinity])
: _v =
(a >= b && a >= c && a >= d && a >= e && a >= f && a >= g && a >= h && a >= i && a >= j)
? a * 1.0
: (b >= c && b >= d && b >= e && b >= f && b >= g && b >= h && b >= i && b >= j)
? b * 1.0
: (c >= d && c >= e && c >= f && c >= g && c >= h && c >= i && c >= j)
? c * 1.0
: (d >= e && d >= f && d >= g && d >= h && d >= i && d >= j)
? d * 1.0
: (e >= f && e >= g && e >= h && e >= i && e >= j)
? e * 1.0
: (f >= g && f >= h && f >= i && f >= j)
? f * 1.0
: (g >= h && g >= i && g >= j)
? g * 1.0
: (h >= i && h >= j)
? h * 1.0
: (i >= j)
? i * 1.0
: j * 1.0;