Skip to main content
1 of 2
sajis997
  • 1.3k
  • 1
  • 10
  • 15

intersection between line segments - narrowed precondition

I believe that the issue may already have been discussed here. I want to find if two line segments does intersect and if they do then find and store and intesection points. Now it is already confirmed that one of the line segments will always be parallel to x-axis or y-axis. So in that case how should we reformulate the basic algorithm that checks the line segments intersection ?

Thanks

sajis997
  • 1.3k
  • 1
  • 10
  • 15