core-ktx / androidx.graphics / android.graphics.Rect / contains

contains

inline operator fun Rect.contains(p: Point): Boolean

Returns true if the specified point 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 point to be contained: left <= x < right and top <= y < bottom. An empty rectangle never contains any point.