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
can cause differences between debug and release mode in some edge cases. In debug mode the result is exactly zero, which means the line evaluates to false, but in release mode the result is a very small negative number.
This can be prevented by using return (qy - py) * (rx - qx) - (qx - px) * (ry - qy) < -std::numeric_limits<double>::epsilon(); instead, which seems to solve the problem in my case (the value is on the order of -1e-21). I am curious to know if this is a good solution in general and I am happy to make a pull request out of it if desired.
I found that line
delaunator-cpp/include/delaunator.hpp
Line 76 in c1521f6
This can be prevented by using
return (qy - py) * (rx - qx) - (qx - px) * (ry - qy) < -std::numeric_limits<double>::epsilon();
instead, which seems to solve the problem in my case (the value is on the order of -1e-21). I am curious to know if this is a good solution in general and I am happy to make a pull request out of it if desired.For reference: GeodynamicWorldBuilder/WorldBuilder#479
The text was updated successfully, but these errors were encountered: