Fixed bugs in Recs.rectangleIntersectsSegment