withUpperLimit method

double withUpperLimit(
  1. double max
)

returns this if it is not greater than max, otherwise max

Implementation

double withUpperLimit(double max) =>
    (this as num)._withUpperLimit(max).toDouble();