rectangle-segment intersection method uses 1 segment intersection instead of 4

4 times faster rectangle-segment intersection