mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-12 12:12:10 +00:00
[geometry] Use fraction instead of distance for "follow" and enrichment
This commit is contained in:
@@ -264,8 +264,7 @@ inline void enrich_sort(Container& operations,
|
||||
if (prev_op.seg_id == op.seg_id
|
||||
&& (turn_points[prev->index].method != method_crosses
|
||||
|| turn_points[it->index].method != method_crosses)
|
||||
&& geometry::math::equals(prev_op.enriched.distance,
|
||||
op.enriched.distance))
|
||||
&& prev_op.fraction == op.fraction)
|
||||
{
|
||||
if (begin_cluster == boost::end(operations))
|
||||
{
|
||||
|
||||
@@ -304,9 +304,9 @@ class follow
|
||||
|
||||
inline bool use_distance(Turn const& left, Turn const& right) const
|
||||
{
|
||||
return geometry::math::equals(left.operations[0].enriched.distance, right.operations[0].enriched.distance)
|
||||
return left.operations[0].fraction == right.operations[0].fraction
|
||||
? use_operation(left, right)
|
||||
: left.operations[0].enriched.distance < right.operations[0].enriched.distance
|
||||
: left.operations[0].fraction < right.operations[0].fraction
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user