Function segmentIntersectRectangleElement

Determine intersection of a rectangular shaped element and a line segment.