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

@ -21,7 +21,7 @@ namespace sprout {
trunc(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("trunc: Sorry, not implemented.")
? SPROUT_MATH_DETAIL_INT_CONVERSION_OVERFLOW(std::domain_error("trunc: Sorry, not implemented."), x)
: x < 0 ? -static_cast<FloatType>(static_cast<std::uintmax_t>(-x))
: static_cast<FloatType>(static_cast<std::uintmax_t>(x))
;