I find several mistakes in your code:
1) instead
if (max(l1.p1.x,l1.p2.x) >= min(l2.p1.x,l2.p2.x) &&
max(l2.p1.x,l2.p2.x) >= min(l1.p1.x,l1.p1.x) &&
max(l1.p1.y,l1.p2.y) >= min(l2.p1.y,l2.p2.y) &&
max(l2.p1.y,l2.p2.y) >= min(l1.p1.x,l1.p1.y))
should be
if (max(l1.p1.x,l1.p2.x) >= min(l2.p1.x ...
Search found 6 matches
- Sun Dec 04, 2005 1:55 am
- Forum: Algorithms
- Topic: Line Segment intersection
- Replies: 2
- Views: 1908
- Sun Dec 04, 2005 12:45 am
- Forum: Algorithms
- Topic: help me wid dis
- Replies: 2
- Views: 1546
- Sun Dec 04, 2005 12:05 am
- Forum: Algorithms
- Topic: The STL Library
- Replies: 4
- Views: 2301
- Tue Nov 22, 2005 11:13 pm
- Forum: Off topic (General chit-chat)
- Topic: How many language do you know?
- Replies: 32
- Views: 18983
- Thu Nov 10, 2005 11:30 pm
- Forum: Other words
- Topic: Northeastern Europe & Russian regional contest
- Replies: 2
- Views: 2154
- Tue Nov 08, 2005 12:50 pm
- Forum: Algorithms
- Topic: help to solve a common problem
- Replies: 7
- Views: 2714