rect.intersectionWithLine(line)

Return an array of the intersection points of the rectangle and the line. Return null if no intersection exists.