fix math/comparison.hpp

This commit is contained in:
bolero-MURAKAMI 2012-07-07 14:58:46 +09:00
parent 1c65d59971
commit 3b6ba46f17
23 changed files with 389 additions and 175 deletions

View file

@ -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
fmin(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::fmin(static_cast<type>(x), static_cast<type>(y));
}
} // namespace detail