mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-02 21:02:13 +00:00
The optimization is based on the fact that in the most cases the segments handled in the TurnInfoPolicy are disjoint. For disjoint segments first the points are rescaled, then the test for disjoint is run, next the TurnInfoPolicy just returns and the next pair of segments is handled. Therefore to optimze the get_turns() this commit changes two things: 1. the cart_intersect strategy may return just after the calculation of sides for the first segment (2 sides calculation instead of 4), 2. the points are rescaled only one time in the intersection_helper, already rescaled points are passed into the intersection strategy