Let's say I want to saturate an argument number x to a lower-bound value lb if it is lower than lb and otherwise return x itself. Then I can use max(lb, x). Analogously, I can use min(x, ub) if I have an upper bound ub.
Is there a function f, such that if I write f(lb, x, ub), one understands that the return value is the respective one?
lb, ifx < lb;ub, ifx > ub; andx, otherwise.
Or other notation simpler than writing max(lb, min(x, ub)).