Merge pull request #53618 from aaronfranke/signed-angle-vec3i
Add length and length_squared to Vector2i/3i
This commit is contained in:
commit
e1766da4bd
6 changed files with 53 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue