diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Vector2i.xml | 13 | ||||
-rw-r--r-- | doc/classes/Vector3i.xml | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 74c9c23de0..721c73d603 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -64,6 +64,19 @@ 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="length" qualifiers="const"> + <return type="float" /> + <description> + Returns the length (magnitude) of this vector. + </description> + </method> + <method name="length_squared" qualifiers="const"> + <return type="int" /> + <description> + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 9b952292b6..da729e1ec2 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -58,6 +58,19 @@ 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="length" qualifiers="const"> + <return type="float" /> + <description> + Returns the length (magnitude) of this vector. + </description> + </method> + <method name="length_squared" qualifiers="const"> + <return type="int" /> + <description> + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> |