aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkFloatingPoint.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkFloatingPoint.h')
-rw-r--r--include/core/SkFloatingPoint.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/core/SkFloatingPoint.h b/include/core/SkFloatingPoint.h
index 9f354fbfae..b3e490d604 100644
--- a/include/core/SkFloatingPoint.h
+++ b/include/core/SkFloatingPoint.h
@@ -16,10 +16,11 @@
#include <float.h>
#include "SkFloatBits.h"
-// If math.h had powf(float, float), I could remove this wrapper
+// C++98 cmath std::pow seems to be the earliest portable way to get float pow.
+// However, on Linux including cmath undefines isfinite.
+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14608
static inline float sk_float_pow(float base, float exp) {
- return static_cast<float>(pow(static_cast<double>(base),
- static_cast<double>(exp)));
+ return powf(base, exp);
}
static inline float sk_float_copysign(float x, float y) {