Skip to content

Commit 17f7157

Browse files
committed
New MSVC has log2 already defined
1 parent fc1732e commit 17f7157

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libpdffit2/MathUtils.h

+3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ const double deltar_tol = 1.0e-3;
3434
#ifdef _MSC_VER
3535
#include <cfloat>
3636

37+
#if _MSC_VER < 1800 // log2 has been available since MSVC 2013
3738
inline double log2(double x) { return log(x)/log(2.0); }
39+
#endif
40+
3841
inline int isnan(double x) { return _isnan(x); }
3942
inline double round(double x) { return (x < 0) ? ceil(x - 0.5) : floor(x + 0.5); }
4043

0 commit comments

Comments
 (0)