File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88#include " MPL_isnan.h"
99#include < queue>
1010
11+ static inline double my_round (double v) {
12+ return (double )(int )(v + ((v >= 0.0 ) ? 0.5 : -0.5 ));
13+ }
14+
1115class PathIterator
1216{
1317 PyArrayObject* m_vertices;
@@ -157,8 +161,8 @@ class SimplifyPath
157161 cmd = m_source->vertex (x, y);
158162 if (m_quantize && agg::is_vertex (cmd))
159163 {
160- *x = round (*x) + 0.5 ;
161- *y = round (*y) + 0.5 ;
164+ *x = my_round (*x) + 0.5 ;
165+ *y = my_round (*y) + 0.5 ;
162166 }
163167 return cmd;
164168 }
@@ -214,8 +218,8 @@ class SimplifyPath
214218 // Do any quantization if requested
215219 if (m_quantize && agg::is_vertex (cmd))
216220 {
217- *x = round (*x) + 0.5 ;
218- *y = round (*y) + 0.5 ;
221+ *x = my_round (*x) + 0.5 ;
222+ *y = my_round (*y) + 0.5 ;
219223 }
220224
221225 // if we are starting a new path segment, move to the first point
You can’t perform that action at this time.
0 commit comments