ly.img.android.pesdk.backend.model.chunk / RelativeRectAccurate / contains

contains

fun contains(x: java.math.BigDecimal, y: java.math.BigDecimal): boolean

Returns true if (x,y) is inside the rectangle. The left and top are considered to be inside, while the right and bottom are not. This means that for a x,y to be contained: left <= x < right and top <= y < bottom. An empty rectangle never contains any point.

Parameters

x - java.math.BigDecimal: The X coordinate of the point being tested for containment

y - java.math.BigDecimal: The Y coordinate of the point being tested for containment

Return
boolean: true iff (x,y) are contained by the rectangle, where containment means left <= x < right and top <= y < bottom

fun contains(left: java.math.BigDecimal, top: java.math.BigDecimal, right: java.math.BigDecimal, bottom: java.math.BigDecimal): boolean

Returns true iff the 4 specified sides of a rectangle are inside or equal to this rectangle. i.e. is this rectangle a superset of the specified rectangle. An empty rectangle never contains another rectangle.

Parameters

left - java.math.BigDecimal: The left side of the rectangle being tested for containment

top - java.math.BigDecimal: The top of the rectangle being tested for containment

right - java.math.BigDecimal: The right side of the rectangle being tested for containment

bottom - java.math.BigDecimal: The bottom of the rectangle being tested for containment

Return
boolean: true iff the the 4 specified sides of a rectangle are inside or equal to this rectangle

fun contains(r: RelativeRectAccurate): boolean

Returns true iff the specified rectangle r is inside or equal to this rectangle. An empty rectangle never contains another rectangle.

Parameters

r - RelativeRectAccurate: The rectangle being tested for containment.

Return
boolean: true iff the specified rectangle r is inside or equal to this rectangle