From 949691799f67ff8b42f53ab96449b1515e50edd3 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 19 May 2014 01:38:39 +0300 Subject: [PATCH] [distance] fix bug in point-box distance computation in range-to-segment/box code --- .../algorithms/detail/distance/range_to_segment_or_box.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/geometry/algorithms/detail/distance/range_to_segment_or_box.hpp b/include/boost/geometry/algorithms/detail/distance/range_to_segment_or_box.hpp index e1d113ff3..56ff37616 100644 --- a/include/boost/geometry/algorithms/detail/distance/range_to_segment_or_box.hpp +++ b/include/boost/geometry/algorithms/detail/distance/range_to_segment_or_box.hpp @@ -132,7 +132,7 @@ private: comparable_return_type cd_min = strategy.apply(point, box_points[0], box_points[3]); - for (unsigned int i = 0; i < 2; ++i) + for (unsigned int i = 0; i < 3; ++i) { comparable_return_type cd = strategy.apply(point, box_points[i], box_points[i+1]);