Skip to content
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

Questions about Segments Intersection #1

Closed
WaterWan opened this issue Aug 30, 2018 · 0 comments
Closed

Questions about Segments Intersection #1

WaterWan opened this issue Aug 30, 2018 · 0 comments

Comments

@WaterWan
Copy link

In this code:
https://github.com/mostafa-saad/ArabicCompetitiveProgramming/blob/master/04%20Math/Computational_Geometry_12_Line_Sweep_2_Segments_Intersection.cpp
When I use the code, I use this case:
5
1 1 3 3
1 2 3 2
1 3 3 1
-1 -1 2 3
0 -2 1 4
It should give six intersections(although 4 different) , but it only gives five(3 different):
5 4
2 1
3 2
4 3
3 1

The ignored one should be '2 4'. I can just find the problem, but I don't know how to deal with it. Could you give me some advice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants