intersects

fun intersects(x: Int, y: Int, width: Int, height: Int): Boolean

Indicates whether this viewport intersects a specified viewport. Two viewport intersect when both overlap by a non-zero amount. An empty viewport never intersects another viewport.

Return

true if the specified viewport intersections this viewport, false otherwise

Parameters

x

the X component of the viewport to test intersection with

y

the Y component of the viewport to test intersection with

width

the viewport width to test intersection with

height

the viewport height to test intersection with


fun intersects(viewport: Viewport): Boolean

Indicates whether this viewport intersects a specified viewport. Two viewport intersect when both overlap by a non-zero amount. An empty viewport never intersects another viewport.

Return

true if the specified viewport intersections this viewport, false otherwise

Parameters

viewport

the viewport to test intersection with