fix max
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
namespace hack::math
|
namespace hack::math
|
||||||
{
|
{
|
||||||
@@ -11,6 +10,6 @@ namespace hack::math
|
|||||||
template<typename T, typename U, typename RT = std::common_type_t<T, U>>
|
template<typename T, typename U, typename RT = std::common_type_t<T, U>>
|
||||||
inline RT max(T a, U b)
|
inline RT max(T a, U b)
|
||||||
{
|
{
|
||||||
return std::max(a, b);
|
return a > b ? a : b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user