c99_math: (trivial) implement exp2 for MSVC too
authorRoland Scheidegger <sroland@vmware.com>
Wed, 29 Jul 2015 20:20:04 +0000 (22:20 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Wed, 29 Jul 2015 20:20:04 +0000 (22:20 +0200)
Unsurprisingly doesn't build otherwise with old msvc.

include/c99_math.h

index 0ca5a73b58adf72dd9f824f4b48211e08a8c3738..8a67fb133d6e26013c0e5be8e5d84d33d0a5b5e9 100644 (file)
@@ -146,6 +146,12 @@ exp2f(float f)
    return powf(2.0f, f);
 }
 
+static inline double
+exp2(double d)
+{
+   return pow(2.0, d);
+}
+
 #endif /* C99 */