2
0
mirror of https://github.com/boostorg/polygon.git synced 2026-02-13 12:42:12 +00:00

fix for line segment contains point

[SVN r73379]
This commit is contained in:
Luke Simonson
2011-07-26 16:30:59 +00:00
parent 0dad75432c
commit e30fae9d2d

View File

@@ -143,6 +143,11 @@ namespace boost { namespace polygon{
if(on_above_or_below(segment, value) == 0) {
rectangle_data<typename directed_line_segment_traits<segment_type>::coordinate_type> rect;
set_points(rect, low(segment), high(segment));
if(area(rect) == 0.0) {
if(!consider_touch) {
return !equivalence(value, low(segment)) && !equivalence(value, high(segment));
}
}
return contains(rect, value, consider_touch);
}
return false;