Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73379 - trunk/boost/polygon
From: lucanus.j.simonson_at_[hidden]
Date: 2011-07-26 12:31:00


Author: ljsimons
Date: 2011-07-26 12:30:59 EDT (Tue, 26 Jul 2011)
New Revision: 73379
URL: http://svn.boost.org/trac/boost/changeset/73379

Log:
fix for line segment contains point
Text files modified:
   trunk/boost/polygon/directed_line_segment_concept.hpp | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Modified: trunk/boost/polygon/directed_line_segment_concept.hpp
==============================================================================
--- trunk/boost/polygon/directed_line_segment_concept.hpp (original)
+++ trunk/boost/polygon/directed_line_segment_concept.hpp 2011-07-26 12:30:59 EDT (Tue, 26 Jul 2011)
@@ -143,6 +143,11 @@
     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;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk