sknano.core.geometric_regions.Square.contains

Square.contains(point)[source][source]

Test region membership of point in Square.

Parameters:

point : array_like

Returns:

bool

True if point is within Square, False otherwise.

Notes

A point \((p_x, p_y)\) is within the bounded region of a square with center \((c_x, c_y)\) and side length \(a\) if the following is true:

\[c_i - \frac{a}{2}\le p_i\le c_i + \frac{a}{2}\forall i\in \{x, y\}\]