Skip to content

Conversation

@Chillee
Copy link
Collaborator

@Chillee Chillee commented Apr 26, 2019

Built on top of #78 , so review/merge that one first. I'll rebase when that's merged.

This is currently mostly just for keeping track of what I'm working on.

@Chillee
Copy link
Collaborator Author

Chillee commented May 5, 2019

The logic for checking whether it crosses the line is fundamentally the same, so I don't think the behavior for numerical accuracy should be better/worse. It's mainly just a shortened version (with the observation that subtracting the booleans should result in the same sign as the cross product if it intersects).

Other than that, the main change is that we're using a vector instead of iterators.

image

@Chillee
Copy link
Collaborator Author

Chillee commented May 5, 2019

Kattis PointInPolygon submission: https://ideone.com/T4D6qk

Couldn't find copsrobbers or intersection.

Copy link
Member

@simonlindholm simonlindholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, seems like it should be equivalent to the previous version

@simonlindholm simonlindholm merged commit 7681b3e into kth-competitive-programming:master May 5, 2019
hockyy pushed a commit to hockyy/kactl that referenced this pull request Oct 24, 2023
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.

2 participants