We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c94e84f + 92c7ce0 commit c5744eeCopy full SHA for c5744ee
src/sgl/sgl.cpp
@@ -2409,7 +2409,13 @@ point_in_polygon_result prepared_geometry::contains(const vertex_xy &vert) const
2409
return crossings % 2 == 0 ? point_in_polygon_result::EXTERIOR : point_in_polygon_result::INTERIOR;
2410
}
2411
2412
- if(stack[depth] != index.level_array[depth].entry_count - 1) {
+ // The end of this node is either the end of the current node, or the end of the level
2413
+ const auto node_end = ((stack[depth - 1] + 1) * NODE_SIZE) - 1;
2414
+ const auto levl_end = index.level_array[depth].entry_count - 1;
2415
+
2416
+ const auto end = math::min(node_end, levl_end);
2417
2418
+ if(stack[depth] != end) {
2419
// Go sideways!
2420
stack[depth]++;
2421
break;
0 commit comments