Add Get Center Method for Rect2/Rect2i and AABB.
This commit is contained in:
parent
87de2e7c4a
commit
90908cd67d
33 changed files with 133 additions and 56 deletions
|
|
@ -61,6 +61,12 @@
|
|||
Returns the volume of the [AABB].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_center" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the center of the [AABB], which is equal to [member position] + ([member size] / 2).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_endpoint" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
|
|
|
|||
|
|
@ -78,6 +78,12 @@
|
|||
Returns the area of the [Rect2].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_center" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the center of the [Rect2], which is equal to [member position] + ([member size] / 2).
|
||||
</description>
|
||||
</method>
|
||||
<method name="grow" qualifiers="const">
|
||||
<return type="Rect2" />
|
||||
<argument index="0" name="amount" type="float" />
|
||||
|
|
|
|||
|
|
@ -76,6 +76,13 @@
|
|||
Returns the area of the [Rect2i].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_center" qualifiers="const">
|
||||
<return type="Vector2i" />
|
||||
<description>
|
||||
Returns the center of the [Rect2i], which is equal to [member position] + ([member size] / 2).
|
||||
If [member size] is an odd number, the returned center value will be rounded towards [member position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="grow" qualifiers="const">
|
||||
<return type="Rect2i" />
|
||||
<argument index="0" name="amount" type="int" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue