Added a rough line segment intersection function