diff --git a/Source/Core/Common/MathUtil.h b/Source/Core/Common/MathUtil.h index 1efeca4066..c9bd3e09b4 100644 --- a/Source/Core/Common/MathUtil.h +++ b/Source/Core/Common/MathUtil.h @@ -56,19 +56,6 @@ union IntFloat { explicit IntFloat(float _f) : f(_f) {} }; -inline bool IsINF(double d) -{ - IntDouble x(d); - return (x.i & ~DOUBLE_SIGN) == DOUBLE_EXP; -} - -inline bool IsNAN(double d) -{ - IntDouble x(d); - return ((x.i & DOUBLE_EXP) == DOUBLE_EXP) && - ((x.i & DOUBLE_FRAC) != DOUBLE_ZERO); -} - inline bool IsQNAN(double d) { IntDouble x(d); diff --git a/Source/UnitTests/Common/MathUtilTest.cpp b/Source/UnitTests/Common/MathUtilTest.cpp index c5f2f20b65..f7427cc8c3 100644 --- a/Source/UnitTests/Common/MathUtilTest.cpp +++ b/Source/UnitTests/Common/MathUtilTest.cpp @@ -20,18 +20,6 @@ TEST(MathUtil, Clamp) EXPECT_EQ(0.0, MathUtil::Clamp(-1.0, 0.0, 2.0)); } -TEST(MathUtil, IsINF) -{ - EXPECT_TRUE(MathUtil::IsINF(+std::numeric_limits::infinity())); - EXPECT_TRUE(MathUtil::IsINF(-std::numeric_limits::infinity())); -} - -TEST(MathUtil, IsNAN) -{ - EXPECT_TRUE(MathUtil::IsNAN(std::numeric_limits::quiet_NaN())); - EXPECT_TRUE(MathUtil::IsNAN(std::numeric_limits::signaling_NaN())); -} - TEST(MathUtil, IsQNAN) { EXPECT_TRUE(MathUtil::IsQNAN(std::numeric_limits::quiet_NaN()));