Skip to content

Improve Quadrant computation robustness by using vector endpoints - #1226

Merged
dr-jts merged 2 commits into
locationtech:masterfrom
dr-jts:improve-quadrant-robustness
Aug 13, 2026
Merged

Improve Quadrant computation robustness by using vector endpoints#1226
dr-jts merged 2 commits into
locationtech:masterfrom
dr-jts:improve-quadrant-robustness

Conversation

@dr-jts

@dr-jts dr-jts commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

When computing the quadrant of a vector it is more robust to use the vector endpoints directly, instead of computing the X and Y deltas (which requires FP arithmetic, not just comparisons). This PR switches to using that method where possible (which includes all uses in the JTS core).

See also #1224.

@dr-jts dr-jts changed the title Improve Quadrant computation robustness by using coordinates Improve Quadrant computation robustness by using vector endpoints Aug 13, 2026
@dr-jts
dr-jts merged commit bc1be3d into locationtech:master Aug 13, 2026
2 checks passed
@dr-jts
dr-jts deleted the improve-quadrant-robustness branch August 13, 2026 21:47
cursor Bot pushed a commit to grootstebozewolf/jts that referenced this pull request Aug 16, 2026
…cationtech#1226)

Order outgoing halves by endpoint quadrant and orientation, not
atan2 of subtracted direction vectors. Stamp TANGENT_LEAVE_ANGLE
when that order ties, so distinct direction points do not collapse.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
cursor Bot pushed a commit to grootstebozewolf/jts that referenced this pull request Aug 16, 2026
One short bullet per validated claim on feature/sfa-curve-rgr.
D-HF from 0ca71b4, not #45. No Bar 2, no locationtech#1224/locationtech#1226.

Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant