limitTo method

T limitTo(
  1. T min,
  2. T max
)

returns this if it is between min and max (inclusive) otherwise returns min or max whichever is closer

Implementation

T limitTo(T min, T max) => _limitTo(min, max);