mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 16:35:40 +02:00
Tiebreaker for comparing rings of the same area
This commit is contained in:
+10
-2
@@ -452,9 +452,17 @@ struct ring_area {
|
||||
// this sorts backwards, so the ring with the largest area comes first
|
||||
if (std::fabs(area) > std::fabs(s.area)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
} else if (std::fabs(area) == std::fabs(s.area)) {
|
||||
if (ear_x < s.ear_x) {
|
||||
return true;
|
||||
} else if (ear_x == s.ear_x) {
|
||||
if (ear_y < s.ear_y) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user