-
Notifications
You must be signed in to change notification settings - Fork 16
1.5.0 #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.5.0 #31
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,6 @@ public final class InternalClipper { | |||||||||||||||||||
| public static final double MIN_COORD = -MAX_COORD; | ||||||||||||||||||||
| private static final long Invalid64 = Long.MAX_VALUE; | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
||||||||||||||||||||
| /** | |
| * @deprecated This constant is kept for backward compatibility. | |
| * Prefer configuring arc tolerance via the newer APIs | |
| * where available. | |
| */ | |
| @Deprecated | |
| public static final double DEFAULT_ARC_TOLERANCE = 0.25; |
Copilot
AI
Mar 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
triSign is intended to return -1/0/1 based on the sign of x, but the current implementation returns 0 for x == 1 (because it checks x > 1). This will make productsAreEqual treat some positive products as having a zero sign (e.g., 110 vs 25), causing InternalClipper.IsCollinear to return false for collinear points. Update the condition to treat all x > 0 as positive.
| return x > 1 ? 1 : 0; | |
| return x > 0 ? 1 : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming the public enum value
ClipType.NonetoNoClipis a source- and binary-incompatible API change for any consumers referencing the old constant. If the goal is to improve naming, consider keepingNoneas a deprecated alias (and updating internal checks to treat bothNoneandNoClipas the no-op value), or document this explicitly as a breaking change in release notes.