clampDouble function

double clampDouble(
  1. {required double value,
  2. required double min,
  3. required double max}
)

Implementation

double clampDouble(
        {required double value,
        required double min,
        required double max}) =>
    value < min
        ? min
        : value > max
            ? max
            : value;