mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
fix math/comparison.hpp
This commit is contained in:
parent
1c65d59971
commit
3b6ba46f17
23 changed files with 389 additions and 175 deletions
|
@ -4,7 +4,7 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/math/detail/config.hpp>
|
||||
#include <sprout/math/float_promote.hpp>
|
||||
#include <sprout/type_traits/float_promote.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
|
||||
namespace sprout {
|
||||
|
@ -26,9 +26,9 @@ namespace sprout {
|
|||
std::is_arithmetic<ArithmeticType1>::value && std::is_arithmetic<ArithmeticType2>::value
|
||||
>::type = sprout::enabler
|
||||
>
|
||||
inline SPROUT_CONSTEXPR typename sprout::math::float_promote<ArithmeticType1, ArithmeticType2>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::float_promote<ArithmeticType1, ArithmeticType2>::type
|
||||
fmax(ArithmeticType1 x, ArithmeticType2 y) {
|
||||
typedef typename sprout::math::float_promote<ArithmeticType1, ArithmeticType2>::type type;
|
||||
typedef typename sprout::float_promote<ArithmeticType1, ArithmeticType2>::type type;
|
||||
return sprout::math::detail::fmax(static_cast<type>(x), static_cast<type>(y));
|
||||
}
|
||||
} // namespace detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue