intersect

fun intersect(left: Int, top: Int, right: Int, bottom: Int): Boolean

If the rectangle specified by left,top,right,bottom intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle. No check is performed to see if either rectangle is empty. Note: To just test for intersection, use .intersects.

Return

true if the specified rectangle and this rectangle intersect (and this rectangle is then set to that intersection) else return false and do not change this rectangle.

Parameters

left

The left side of the rectangle being intersected with this rectangle

top

The top of the rectangle being intersected with this rectangle

right

The right side of the rectangle being intersected with this rectangle.

bottom

The bottom of the rectangle being intersected with this rectangle.


If the specified rectangle intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle. No check is performed to see if either rectangle is empty. To just test for intersection, use intersects()

Return

true if the specified rectangle and this rectangle intersect (and this rectangle is then set to that intersection) else return false and do not change this rectangle.

Parameters

r

The rectangle being intersected with this rectangle.