max constructor

const max(
  1. num a,
  2. num b, [
  3. num c = double.negativeInfinity,
  4. num d = double.negativeInfinity,
  5. num e = double.negativeInfinity,
  6. num f = double.negativeInfinity,
  7. num g = double.negativeInfinity,
  8. num h = double.negativeInfinity,
  9. num i = double.negativeInfinity,
  10. num j = double.negativeInfinity,
])

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;