#ifndef CLITKPORTABILITY_H
#define CLITKPORTABILITY_H
+#if defined(WIN32)
+# define _USE_MATH_DEFINES //Before math.h include (i.e. cmath)
+#endif
#include <cmath>
#if defined(WIN32)
# define rint(x) floor(x+0.5)
# define lrint(x) (long)rint(x)
-# define _USE_MATH_DEFINES
#endif
template<typename T>