intersect

infix fun intersect(rectangle: Rectangle): Rectangle

Returns a Rectangle that is the intersection of this and the given one. The result is Empty if there is no intersection.

Return

a Rectangle representing the intersection of the 2 rectangles

Parameters

rectangle

to intersect with