-
Notifications
You must be signed in to change notification settings - Fork 199
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
refactor: replace LineOrPoint struct with enum #1047
refactor: replace LineOrPoint struct with enum #1047
Conversation
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.
I don't see any errors in the translation, and it "feels" nicer, but I defer to @rmanoka about wether we want to merge a refactor like this to the sweep algo.
lgtm too; can you fix the lint and fuzz CI errors? |
Just looked into it. The error is
I just double checked and my code doesn't include this anymore. Could it be related to some kind of cache or dependency from geo to itself? |
T::Ker::orient2d(*p1, *q1, *p2) | ||
T::Ker::orient2d(**left_a, **right_a, **left_b) | ||
.as_ordering() | ||
.then_with(|| T::Ker::orient2d(*p1, *q1, *q2).as_ordering()), | ||
.then_with(|| { | ||
T::Ker::orient2d(**left_a, **right_a, **right_b).as_ordering() | ||
}), |
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.
Here are my changes, the error isn't even showing the code from the previous version 👀 I rg
-d over the whole repo and I couldn't find the code that was mentioned in the error message ...
8d20cf0
to
7bc35c0
Compare
CI updates your branch locally before running the tests to make sure they are compatible with what's in the Can you either rebase and force push or merge |
7bc35c0
to
83b3f34
Compare
Done 👍 |
I added an entry toCHANGES.md
if knowledge of this change could be valuable to users.This small PR swaps out the
LineOrPoint
struct with an enum approach. It doesn't change the functionality of the type but the use of it should be much more readable now.@rmanoka pinging you since it is mainly your code and I would appreciate a review if you find the time. I'm trying to make improvements step by step but I need to understand the code better (hence this PR). Are PRs like this ok for you?