From b859c1accbb2bf7b19f634346528458ccf11b6f1 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Tue, 13 Feb 2018 00:27:21 +0800 Subject: Fixed building on Microsoft(R) Windows(TM), a.k.a. the most advanced operating system ever. --- include/smmath.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/smmath.hpp b/include/smmath.hpp index d5ed80e..6be239a 100644 --- a/include/smmath.hpp +++ b/include/smmath.hpp @@ -15,7 +15,11 @@ #define sqr(x) ((x)*(x)) #define EPS 1e-8 #ifndef PI -#define PI 3.14159265358979323846f +#define PI 3.14159265358979323846264338327950288f +#endif +#ifdef min //for windows sdk, the stupidest sdk ever +#undef min +#undef max #endif templateconst T& min(const T& a,const T& b){return aconst T& max(const T& a,const T& b){return a>b?a:b;} -- cgit v1.2.3