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

add SPROUT_ASSERT

This commit is contained in:
bolero-MURAKAMI 2013-03-18 19:12:21 +09:00
parent a5e14e71e1
commit 07f052fb6e
32 changed files with 386 additions and 284 deletions

View file

@ -21,7 +21,7 @@ namespace sprout {
inline SPROUT_CONSTEXPR To
ifloor_impl(FloatType x) {
return std::numeric_limits<To>::max() < x || std::numeric_limits<To>::min() > x
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::domain_error("ifloor: large float rounding."), static_cast<To>(x))
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("ifloor: large float rounding."), static_cast<To>(x))
: static_cast<To>(x)
;
}
@ -51,7 +51,7 @@ namespace sprout {
ifloor(FloatType x) {
return x == 0 ? To(0)
: std::numeric_limits<To>::max() < x || std::numeric_limits<To>::min() > x
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::domain_error("ifloor: large float rounding."), static_cast<To>(x))
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("ifloor: large float rounding."), static_cast<To>(x))
: sprout::math::detail::ifloor_impl(x, static_cast<To>(x))
;
}