clampMax method

num clampMax(
  1. num max
)

Returns this number clamped to a maximum value max.

Implementation

num clampMax(num max) => this > max ? max : this;