# {py:mod}`simvx.core.math.rect2` ```{py:module} simvx.core.math.rect2 ``` ```{autodoc2-docstring} simvx.core.math.rect2 :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`Rect2 ` - ```{autodoc2-docstring} simvx.core.math.rect2.Rect2 :summary: ``` ```` ### API `````{py:class} Rect2(x=0.0, y=0.0, width=0.0, height=0.0) :canonical: simvx.core.math.rect2.Rect2 ```{autodoc2-docstring} simvx.core.math.rect2.Rect2 ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.__init__ ``` ````{py:attribute} __slots__ :canonical: simvx.core.math.rect2.Rect2.__slots__ :value: > ('x', 'y', 'width', 'height') ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.__slots__ ``` ```` ````{py:property} position :canonical: simvx.core.math.rect2.Rect2.position :type: tuple[float, float] ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.position ``` ```` ````{py:property} size :canonical: simvx.core.math.rect2.Rect2.size :type: tuple[float, float] ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.size ``` ```` ````{py:property} end :canonical: simvx.core.math.rect2.Rect2.end :type: tuple[float, float] ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.end ``` ```` ````{py:property} area :canonical: simvx.core.math.rect2.Rect2.area :type: float ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.area ``` ```` ````{py:property} center :canonical: simvx.core.math.rect2.Rect2.center :type: tuple[float, float] ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.center ``` ```` ````{py:method} contains_point(x: float, y: float) -> bool :canonical: simvx.core.math.rect2.Rect2.contains_point ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.contains_point ``` ```` ````{py:method} intersects(other: simvx.core.math.rect2.Rect2) -> bool :canonical: simvx.core.math.rect2.Rect2.intersects ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.intersects ``` ```` ````{py:method} intersection(other: simvx.core.math.rect2.Rect2) -> simvx.core.math.rect2.Rect2 :canonical: simvx.core.math.rect2.Rect2.intersection ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.intersection ``` ```` ````{py:method} merge(other: simvx.core.math.rect2.Rect2) -> simvx.core.math.rect2.Rect2 :canonical: simvx.core.math.rect2.Rect2.merge ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.merge ``` ```` ````{py:method} expand(point) -> simvx.core.math.rect2.Rect2 :canonical: simvx.core.math.rect2.Rect2.expand ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.expand ``` ```` ````{py:method} grow(amount: float) -> simvx.core.math.rect2.Rect2 :canonical: simvx.core.math.rect2.Rect2.grow ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.grow ``` ```` ````{py:method} abs() -> simvx.core.math.rect2.Rect2 :canonical: simvx.core.math.rect2.Rect2.abs ```{autodoc2-docstring} simvx.core.math.rect2.Rect2.abs ``` ```` ````{py:method} __eq__(other) :canonical: simvx.core.math.rect2.Rect2.__eq__ ```` ````{py:method} __repr__() :canonical: simvx.core.math.rect2.Rect2.__repr__ ```` `````