Skip to content

Commit 69655fe

Browse files
authored
Merge pull request #8 from rozyczko/updated_math_header
Newer MSVC define log2 internally
2 parents 0430a2e + 17f7157 commit 69655fe

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)