Skip to content

Commit

Permalink
Added a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
efifogel committed Oct 8, 2024
1 parent aab1897 commit a1a29ee
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,12 @@ class Arr_polycurve_traits_2 :
// Add a subcurve to the saved x-monotone curve
auto update_saved_xcv = [&](const X_monotone_subcurve_2& sxcv) {
xcv_saved = true;
// We maintain the invariant that if the input curves have opposite
// directions (! consistent), the overalpping curves are directed
// left=>right. This, however, is not guaranteed by all traits for the
// subcurves. (It is guaranteed by some traits, but this is
// insufficient.) Therefore, we need to enforce it. That is, we make
// sure the subcurves are also directed left=>right in this case.
if (! consistent && (cmp_endpts(sxcv) == LARGER)) {
if (invert_ocv) {
saved_xcv.push_front(ctr_opposite(sxcv));
Expand Down

0 comments on commit a1a29ee

Please sign in to comment.