mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-14 10:39:05 +00:00
Merge pull request #66 from kariya-mitsuru/fix_is_odd
fix math::is_odd for a negative argument
This commit is contained in:
commit
7d0f748870
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue