summaryrefslogtreecommitdiff
path: root/Source/WTF/wtf/MathExtras.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WTF/wtf/MathExtras.h')
-rw-r--r--Source/WTF/wtf/MathExtras.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/WTF/wtf/MathExtras.h b/Source/WTF/wtf/MathExtras.h
index ce72c4aed..f07bce6a3 100644
--- a/Source/WTF/wtf/MathExtras.h
+++ b/Source/WTF/wtf/MathExtras.h
@@ -151,17 +151,17 @@ inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }
inline long long abs(long num) { return labs(num); }
#endif
-#if COMPILER(MSVC)
-// MSVC's math.h does not currently supply log2 or log2f.
+#if OS(ANDROID) || COMPILER(MSVC)
+// ANDROID and MSVC's math.h does not currently supply log2 or log2f.
inline double log2(double num)
{
- // This constant is roughly M_LN2, which is not provided by default on Windows.
+ // This constant is roughly M_LN2, which is not provided by default on Windows and Android.
return log(num) / 0.693147180559945309417232121458176568;
}
inline float log2f(float num)
{
- // This constant is roughly M_LN2, which is not provided by default on Windows.
+ // This constant is roughly M_LN2, which is not provided by default on Windows and Android.
return logf(num) / 0.693147180559945309417232121458176568f;
}
#endif