diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2019-11-28 03:48:51 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-12-02 23:45:41 -0600 |
commit | 24f57886d087d78eb8dcf7be28d790cddadf2c99 (patch) | |
tree | 763990c802e8e590c98aa1ed7091f9490ec264e5 /doc | |
parent | 543462eb29245a7ffb08750ecf1c93d7522e3721 (diff) |
Expose max_axis_index and max_axis_index for Vector2(i)
Some cleanup with Vector3(i)'s methods so that it is consistent with Vector2, for example it returns enums internally (GDScript still gets ints).
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Vector2.xml | 16 | ||||
-rw-r--r-- | doc/classes/Vector2i.xml | 16 | ||||
-rw-r--r-- | doc/classes/Vector3.xml | 14 | ||||
-rw-r--r-- | doc/classes/Vector3i.xml | 14 |
4 files changed, 42 insertions, 18 deletions
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 15f7d2f9e3..49ada66020 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -214,6 +214,18 @@ Returns the vector with a maximum length by limiting its length to [code]length[/code]. </description> </method> + <method name="max_axis_index" qualifiers="const"> + <return type="int" /> + <description> + Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. + </description> + </method> + <method name="min_axis_index" qualifiers="const"> + <return type="int" /> + <description> + Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y]. + </description> + </method> <method name="move_toward" qualifiers="const"> <return type="Vector2" /> <argument index="0" name="to" type="Vector2" /> @@ -315,10 +327,10 @@ </members> <constants> <constant name="AXIS_X" value="0"> - Enumerated value for the X axis. + Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="AXIS_Y" value="1"> - Enumerated value for the Y axis. + Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector2(0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 62362409a5..a9334d924f 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -64,6 +64,18 @@ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. </description> </method> + <method name="max_axis_index" qualifiers="const"> + <return type="int" /> + <description> + Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. + </description> + </method> + <method name="min_axis_index" qualifiers="const"> + <return type="int" /> + <description> + Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y]. + </description> + </method> <method name="sign" qualifiers="const"> <return type="Vector2i" /> <description> @@ -81,10 +93,10 @@ </members> <constants> <constant name="AXIS_X" value="0"> - Enumerated value for the X axis. + Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="AXIS_Y" value="1"> - Enumerated value for the Y axis. + Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector2i(0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 6d87ce9ea8..5174cec02d 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -184,16 +184,16 @@ Returns the vector with a maximum length by limiting its length to [code]length[/code]. </description> </method> - <method name="max_axis" qualifiers="const"> + <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> - Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. + Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> - <method name="min_axis" qualifiers="const"> + <method name="min_axis_index" qualifiers="const"> <return type="int" /> <description> - Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. + Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> <method name="move_toward" qualifiers="const"> @@ -321,13 +321,13 @@ </members> <constants> <constant name="AXIS_X" value="0"> - Enumerated value for the X axis. Returned by [method max_axis] and [method min_axis]. + Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="AXIS_Y" value="1"> - Enumerated value for the Y axis. Returned by [method max_axis] and [method min_axis]. + Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="AXIS_Z" value="2"> - Enumerated value for the Z axis. Returned by [method max_axis] and [method min_axis]. + Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector3(0, 0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 17febdea83..9b952292b6 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -58,16 +58,16 @@ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. </description> </method> - <method name="max_axis" qualifiers="const"> + <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> - Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. + Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> - <method name="min_axis" qualifiers="const"> + <method name="min_axis_index" qualifiers="const"> <return type="int" /> <description> - Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. + Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> <method name="sign" qualifiers="const"> @@ -90,13 +90,13 @@ </members> <constants> <constant name="AXIS_X" value="0"> - Enumerated value for the X axis. + Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="AXIS_Y" value="1"> - Enumerated value for the Y axis. + Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="AXIS_Z" value="2"> - Enumerated value for the Z axis. + Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector3i(0, 0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. |