I find that I frequently end up writing a function that I always call \"clamp()\", that is kind of a combination of min() and max(). Is t
clamp()
min()
max()
median
Because it generalizes to more values.
We use pin here. Actually, we use pin for simple ranges and clamp for other stuff.
pin
clamp