Skip to content

Conversation

@awulkiew
Copy link
Member

Compare both ratios' potential denominators, corresponding to both
segments. Furthermore, take into account the machine epsilon.

Without this change an assertion ratio.denominator() != 0 can fail in intersection_points.hpp line 62, in segments_intersection_points policy. And indeed it fails e.g. in get_turns_linear_linear.cpp unit test if compiled in MinGW with -O2.

Furthermore, if compiled with -O2, the tests which "normally" was passing fails. Some of those cases are fixed if the denominators are compared WRT machine epsilon.

However not all of them. AFAIU the reason is different and related to the way how the determinant is calculated. See this PR: #259 and this ticket: https://svn.boost.org/trac/boost/ticket/8379.

Compare both ratios' potential denominators, corresponding to both
segments. Furthermore, take into account the machine epsilon.
@barendgehrels
Copy link
Collaborator

I'm OK with this, thanks

awulkiew added a commit that referenced this pull request Mar 22, 2015
[strategies][cart_intersect] Compare ratios denominators consistently.
@awulkiew awulkiew merged commit d1358af into boostorg:develop Mar 22, 2015
@awulkiew awulkiew deleted the fix/cart_intersect branch April 9, 2015 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants