Re: [Boost-bugs] [Boost C++ Libraries] #10890: Problem with collinear point/segment and rtree

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10890: Problem with collinear point/segment and rtree
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-22 03:38:28


#10890: Problem with collinear point/segment and rtree
------------------------------------------------+--------------------------
  Reporter: jon brookshire <jon.brookshire@…> | Owner:
      Type: Bugs | barendgehrels
 Milestone: To Be Determined | Status: new
   Version: Boost 1.57.0 | Component: geometry
Resolution: | Severity: Problem
                                                | Keywords:
------------------------------------------------+--------------------------

Comment (by jon brookshire <jon.brookshire@…>):

 Better still:

 {{{
  static inline return_type relate_one_degenerate(
             DegenerateSegment const& degenerate_segment
             , RobustType d
             , RobustType s1, RobustType s2
             , bool a_degenerate
             )
     {
         // Calculate the ratios where ds starts in s
         // a1--------->a2 (2..6)
         // b1/b2 (4..4)
         // Ratio: (4-2)/(6-2)

         RatioType const ratio(d - s1, s2 - s1);

         if ( !ratio.on_segment() )
           return Policy::disjoint();

         return Policy::one_degenerate(degenerate_segment, ratio,
 a_degenerate);
     }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10890#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC