ly.img.android.pesdk.backend.model.chunk / RelativeRectFast / intersect

intersect

open fun intersect(r: RelativeRectFast!): Boolean

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()

Parameters

r - RelativeRectFast!: The rectangle being intersected with this rectangle.

Return
Boolean: 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.

open fun intersect(left: Double, top: Double, right: Double, bottom: Double): 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()

Parameters

left - Double: The left side of the rectangle being intersected with this rectangle

top - Double: The top of the rectangle being intersected with this rectangle

right - Double: The right side of the rectangle being intersected with this rectangle.

bottom - Double: The bottom of the rectangle being intersected with this rectangle.

Return
Boolean: 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.