limitMax method

int limitMax(
  1. int maxValue
)

Determines the maximum limitation of two values.

If this value is smaller than {maxValue}, this value is returned, owherwise, {maxvalue} is returned.

Implementation

int limitMax(int maxValue) => this > maxValue ? maxValue : this;