Loading...
Searching...
No Matches
Clamp.hpp
1#pragma once
2
3template <typename T, typename U, typename V>
4inline auto clamp(T val, U min, V max)
5{
6 return val < min ? min : (val > max ? max : val);
7}