change rectange-segment-intersection algo&tests