applyCap and applyThreshold

Adding a clamped(to:) method to the Comparable type has been suggested before, e.g. here: [draft] Add `clamped(to:)` to the stdlib .

1 Like