Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/poly2tri/common/utils.h')
-rw-r--r--src/poly2tri/common/utils.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/poly2tri/common/utils.h b/src/poly2tri/common/utils.h
index 4bcb76361..9a9e14a8a 100644
--- a/src/poly2tri/common/utils.h
+++ b/src/poly2tri/common/utils.h
@@ -1,6 +1,6 @@
/*
- * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
- * http://code.google.com/p/poly2tri/
+ * Poly2Tri Copyright (c) 2009-2018, Poly2Tri Contributors
+ * https://github.com/jhasse/poly2tri
*
* All rights reserved.
*
@@ -34,11 +34,18 @@
// Otherwise #defines like M_PI are undeclared under Visual Studio
#ifndef _USE_MATH_DEFINES
- #define _USE_MATH_DEFINES
+ #define _USE_MATH_DEFINES
#endif /* _USE_MATH_DEFINES */
+#include "shapes.h"
+
+#include <cmath>
#include <exception>
-#include <math.h>
+
+// C99 removes M_PI from math.h
+#ifndef M_PI
+#define M_PI 3.14159265358979323846264338327
+#endif
namespace p2t {
@@ -121,4 +128,4 @@ bool InScanArea(const Point& pa, const Point& pb, const Point& pc, const Point&
}
-#endif \ No newline at end of file
+#endif