maths: make limit constexpr friendly
This commit is contained in:
parent
556ba956a3
commit
4aeacc3a27
@ -353,7 +353,7 @@ template <typename T, typename U, typename V>
|
|||||||
constexpr T
|
constexpr T
|
||||||
limit [[gnu::pure]] (const T val, const U lo, const V hi)
|
limit [[gnu::pure]] (const T val, const U lo, const V hi)
|
||||||
{
|
{
|
||||||
CHECK_LE (lo, hi);
|
lo > hi ? (void)0 : panic ();
|
||||||
|
|
||||||
return val > hi ? hi:
|
return val > hi ? hi:
|
||||||
val < lo ? lo:
|
val < lo ? lo:
|
||||||
|
Loading…
Reference in New Issue
Block a user