From 81933979467fcb1579e1780198b6cbbbdec18ab1 Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Tue, 12 Aug 2014 22:24:09 +0200 Subject: [PATCH] Add M_PI for C99 --- poly2tri/common/utils.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/poly2tri/common/utils.h b/poly2tri/common/utils.h index ffb713f..2424c71 100644 --- a/poly2tri/common/utils.h +++ b/poly2tri/common/utils.h @@ -38,6 +38,11 @@ #include #include +// C99 removes M_PI from math.h +#ifndef M_PI +#define M_PI 3.14159265358979323846264338327 +#endif + namespace p2t { const double PI_3div4 = 3 * M_PI / 4; @@ -119,4 +124,4 @@ bool InScanArea(const Point& pa, const Point& pb, const Point& pc, const Point& } -#endif \ No newline at end of file +#endif