You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've written pure Python port with separate C++ binding (available on PyPI), according to pseudo-randomized tests it is equivalent to the original C++ code.
Also locally I've tried to use Fractions instead of integers for coordinates, but without success, it seems that this kind of generalization requires deep understanding of the underlying algorithm which I unfortunately don't have.
The text was updated successfully, but these errors were encountered:
It is not possible with this algorithm to operate with floating point values currently. There is quite a bit of logic in the algorithm itself that currently relies on the math to work in integers, one of the biggest issues is detecting order of intersections and handling shared points if the algorithm is shifted to floating point values. I do not see a way to do this effectively. If the algorithm wants to handle floating point values, the best thing might be to simply scale up floating points value to an integer range then downscale the integer values after to floating point. Unfortunately, downscaling can introduce some new invalid features into the polygon in some cases, so this is hard to generalize.
I've written pure Python port with separate C++ binding (available on PyPI), according to pseudo-randomized tests it is equivalent to the original C++ code.
Also locally I've tried to use
Fraction
s instead of integers for coordinates, but without success, it seems that this kind of generalization requires deep understanding of the underlying algorithm which I unfortunately don't have.The text was updated successfully, but these errors were encountered: