1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

add math fmod

fix math cos
This commit is contained in:
bolero-MURAKAMI 2012-12-02 17:06:37 +09:00
parent d57b6e2b18
commit 18b479e3ac
15 changed files with 123 additions and 89 deletions

View file

@ -35,7 +35,7 @@ namespace sprout {
round(FloatType x) {
return sprout::math::isinf(x) ? x
: std::numeric_limits<std::uintmax_t>::max() < x || std::numeric_limits<std::uintmax_t>::max() < -x
? throw std::domain_error("round: Sorry, not implemented.")
? SPROUT_MATH_DETAIL_INT_CONVERSION_OVERFLOW(std::domain_error("round: Sorry, not implemented."), x)
: x < 0 ? sprout::math::detail::round_impl_nagative(x, -static_cast<FloatType>(static_cast<std::uintmax_t>(-x)))
: sprout::math::detail::round_impl_positive(x, static_cast<FloatType>(static_cast<std::uintmax_t>(x)))
;