sknano.core.geometric_regions.Rectangle.contains¶
-
Rectangle.
contains
(point)[source][source]¶ Test region membership of point in
Rectangle
.Parameters: point : array_like
Returns: True if point is within
Rectangle
, False, otherwise.Notes
A point \((p_x, p_y)\) is within the bounded region of a rectangle with lower corner at \(p_{\mathrm{min}}= (x_{\mathrm{min}}, y_{\mathrm{min}})\) and upper corner at \(p_{\mathrm{max}}= (x_{\mathrm{max}}, y_{\mathrm{max}})\) if the following is true:
\[x_{\mathrm{min}}\le x\le x_{\mathrm{max}}\land\]\[y_{\mathrm{min}}\le y\le y_{\mathrm{max}}\]