From 9dbedacddadac160ecbcb777ec62089280794da3 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Wed, 19 Oct 2011 15:17:48 +0100 Subject: [PATCH] add round() and M_PI support for windows builds --- include/mapnik/global.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/mapnik/global.hpp b/include/mapnik/global.hpp index 83e87db7e..55eb6f1b1 100644 --- a/include/mapnik/global.hpp +++ b/include/mapnik/global.hpp @@ -166,8 +166,21 @@ inline int rint( double val) { return int(floor(val + 0.5)); } + +inline double round (double val) +{ + return floor(val); +} + +#define _USE_MATH_DEFINES +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + #endif } + + #endif //GLOBAL_HPP