mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-02-04 21:33:56 +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
|
inline SPROUT_CONSTEXPR bool
|
||||||
is_odd(FloatType x) {
|
is_odd(FloatType x) {
|
||||||
return sprout::math::isfinite(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
|
} // namespace math
|
||||||
|
|
Loading…
Add table
Reference in a new issue