mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
workaround for no c++11 numeric_limits
This commit is contained in:
parent
ce16e24637
commit
7a1974742a
110 changed files with 727 additions and 436 deletions
|
@ -25,8 +25,8 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR FloatType
|
||||
erfc(FloatType x) {
|
||||
return sprout::math::isnan(x) ? x
|
||||
: x == std::numeric_limits<FloatType>::infinity() ? FloatType(0)
|
||||
: x == -std::numeric_limits<FloatType>::infinity() ? FloatType(2)
|
||||
: x == sprout::numeric_limits<FloatType>::infinity() ? FloatType(0)
|
||||
: x == -sprout::numeric_limits<FloatType>::infinity() ? FloatType(2)
|
||||
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
|
||||
: std::erfc(x)
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue