This is a simple line-segment intersection detection program. Feel free to use :) Algorithms from: https://www.tutorialspoint.com/Check-if-two-line-segments-intersect