mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-16 15:14:13 +00:00
add SPROUT_ASSERT
This commit is contained in:
parent
a5e14e71e1
commit
07f052fb6e
32 changed files with 386 additions and 284 deletions
|
@ -22,7 +22,7 @@ namespace sprout {
|
|||
: x == std::numeric_limits<FloatType>::infinity() ? std::numeric_limits<FloatType>::infinity()
|
||||
: x == -std::numeric_limits<FloatType>::infinity() ? -std::numeric_limits<FloatType>::infinity()
|
||||
: std::numeric_limits<std::uintmax_t>::max() < x || std::numeric_limits<std::uintmax_t>::max() < -x
|
||||
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::domain_error("trunc: large float rounding."), x)
|
||||
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("trunc: large float rounding."), x)
|
||||
: x < 0 ? -static_cast<FloatType>(static_cast<std::uintmax_t>(-x))
|
||||
: static_cast<FloatType>(static_cast<std::uintmax_t>(x))
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue