fix math functions

This commit is contained in:
bolero-MURAKAMI 2013-05-06 00:22:08 +09:00
parent fccb16687b
commit 7794e56192
27 changed files with 342 additions and 102 deletions

View file

@ -37,8 +37,8 @@ namespace sprout {
atan2(FloatType y, FloatType x) {
return sprout::math::isnan(y)
? sprout::math::isnan(x)
? sprout::math::signbit(y) && sprout::math::signbit(x) ? -std::numeric_limits<double>::quiet_NaN()
: std::numeric_limits<double>::quiet_NaN()
? sprout::math::signbit(y) && sprout::math::signbit(x) ? -std::numeric_limits<FloatType>::quiet_NaN()
: std::numeric_limits<FloatType>::quiet_NaN()
: y
: sprout::math::isnan(x) ? x
: x == -std::numeric_limits<FloatType>::infinity()