Merge pull request #66 from kariya-mitsuru/fix_is_odd

fix math::is_odd for a negative argument
This commit is contained in:
Bolero MURAKAMI 2014-07-16 01:29:15 +09:00
commit 7d0f748870

View file

@ -33,7 +33,7 @@ namespace sprout {
inline SPROUT_CONSTEXPR bool
is_odd(FloatType x) {
return sprout::math::isfinite(x)
&& sprout::math::detail::is_odd_unchecked(x)
&& sprout::math::detail::is_odd_unchecked(x < 0 ? -x : x)
;
}
} // namespace math