forceInRange method
Returns the min if the number is less than min, max if greater
than max, or the number itself otherwise.
Audited: 2026-06-12 11:26 EDT
Implementation
@useResult
num forceInRange(num min, final num max) => this < min ? min : (this > max ? max : this);