Index: Source/wtf/MathExtras.h |
diff --git a/Source/wtf/MathExtras.h b/Source/wtf/MathExtras.h |
index c4945061e8d2f732a22e99cb69b4b6ce88faf839..42ff1224ad354e230628feacc550786470b1866d 100644 |
--- a/Source/wtf/MathExtras.h |
+++ b/Source/wtf/MathExtras.h |
@@ -116,7 +116,12 @@ inline float log2f(float num) |
} |
#endif |
-#if COMPILER(MSVC) && (_MSC_VER < 1800) |
+#if COMPILER(MSVC) |
+ |
+// VS2013 has most of the math functions now, but we still need to work |
+// around various differences in behavior of Inf. |
+ |
+#if _MSC_VER < 1800 |
namespace std { |
@@ -132,6 +137,8 @@ inline float nextafterf(float x, float y) { return x > y ? x - FLT_EPSILON : x + |
inline double copysign(double x, double y) { return _copysign(x, y); } |
+#endif // _MSC_VER |
+ |
// Work around a bug in Win, where atan2(+-infinity, +-infinity) yields NaN instead of specific values. |
inline double wtf_atan2(double x, double y) |
{ |
@@ -165,6 +172,8 @@ inline double wtf_pow(double x, double y) { return y == 0 ? 1 : pow(x, y); } |
#define fmod(x, y) wtf_fmod(x, y) |
#define pow(x, y) wtf_pow(x, y) |
+#if _MSC_VER < 1800 |
+ |
// MSVC's math functions do not bring lrint. |
inline long int lrint(double flt) |
{ |
@@ -187,6 +196,8 @@ inline long int lrint(double flt) |
return static_cast<long int>(intgr); |
} |
+#endif // _MSC_VER |
+ |
#endif // COMPILER(MSVC) |
inline double deg2rad(double d) { return d * piDouble / 180.0; } |