clampMax method

T clampMax(
  1. T maxValue
)

Returns the smaller value between this value and maxValue.

If this value is smaller than maxValue, it is returned. Otherwise, maxValue is returned.

Implementation

T clampMax(T maxValue) => ([this, maxValue]).min();