Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
8.8
-
New
Description
Circle2D intersectsLine does a dot product to determine closest point on line but then filters it like this:
final double distance = dotProduct / magnitudeAB; if (distance < 0 || distance > dotProduct) { return false; }
If magnitudeAB (squared length of line) is less than 1 (degree), this will always return false.
distance is actually the "t-value", meaning the correct behaviour here would be to clamp it between 0 and 1 to ensure point is on actual line.
A straightforward fix that works since edge and end points are checked anyway:
final double distance = dotProduct / magnitudeAB; if (distance < 0 || distance > 1) { return false; }
This is tested and verified by building version 8.8.0 and replacing jar-files in an elasticsearch instance of version 7.12.
Attachments
Attachments
Issue Links
- links to