limitHigh method

double limitHigh(
  1. double max
)

Restrict value from max.

Implementation

double limitHigh(double max) {
  if (this > max) {
    return max;
  }
  return this;
}