Another union ring problem :) - Unable to complete output ring starting at ....
union(...[[[[-13.659807482533342,15.000000000000004],[-4.619397662556434,-1.9134171618254447],[-9.750026667063697,15.000000000000004],[-13.659807482533342,15.000000000000004]]],[[[-9.750026667063697,15.000000000000004],[-4.903926402016152,-0.9754516100806383],[-6.477371050357451,15.000000000000004],[-9.750026667063697,15.000000000000004]]]]);
Unable to complete output ring starting at [-13.659807482533342, 15.000000000000004]. Last matching segment found ends at [-9.750026667063697, 15.000000000000004].
Seems to also occur in current master.
Thanks for the failing coordinates @pentacular, I've reproduced the failure on my side
Ok, I think that I understand the problem a little better now.
If we reduce the mantissa of the floats involved, by trimming the number of significant digits, the problem disappears.
e.g.
polygonClipping.union(...[[[[-13.65980,15.00000],[-4.61939,-1.91341],[-9.75002,15.00000],[-13.65980,15.00000]]],[[[-9.75002,15.00000],[-4.90392,-0.97545],[-6.47737,15.00000],[-9.75002,15.00000]]]]);
works fine.
Which leads me to think that this is due to numeric instability.
Re: numeric instability - most of the bugs in this repo turn out to be related somehow to the joys of floating point math.
I've verified this bug is still happening with the latest on master.