|
| template<typename T, typename R> |
| const T & | clamp (const T &x, const T &min, const T &max, R r) |
| | clamp implementation
|
| template<typename T, typename R> |
| T & | clamp (T &x, T &min, T &max, R r) |
| | clamp implementation
|
| template<typename T> |
| const T & | clamp (const T &x, const T &min, const T &max) |
| | clamp implementation
|
| template<typename T> |
| T & | clamp (T &x, T &min, T &max) |
| | clamp implementation
|
| template<typename T, typename R> |
| const T & | clamp_unordered (const T &x, const T &min, const T &max, R r) |
| | clamp_unordered implementation
|
| template<typename T, typename R> |
| T & | clamp_unordered (T &x, T &min, T &max, R r) |
| | clamp_unordered implementation
|
| template<typename T> |
| const T & | clamp_unordered (const T &x, const T &min, const T &max) |
| | clamp_unordered implementation
|
| template<typename T> |
| T & | clamp_unordered (T &x, T &min, T &max) |
| | clamp_unordered implementation
|
As with adobe::min and adobe::max, clamp is a select algorithm. The clamp algorithm returns min if x is less than min and max if x is greater than max.
The clamp algorithm is stable with respect to the order min, x, max.
The clamp_unorderd algorithm does not presume an ordering between min and max. It is equivalent to median(min, x, max).
- See also
-