Given two lines, calculate the intersection point, if any
Adapted from How to check if two line segments intersect
Cloned with blockbuilder.org