diff options
Diffstat (limited to 'doc/classes/Vector2.xml')
-rw-r--r-- | doc/classes/Vector2.xml | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 94d4b1a903..07d09c31dc 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -110,13 +110,15 @@ Returns the vector with all components rounded up (towards positive infinity). </description> </method> - <method name="clamped" qualifiers="const"> + <method name="clamp" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="length" type="float"> + <argument index="0" name="min" type="Vector2"> + </argument> + <argument index="1" name="max" type="Vector2"> </argument> <description> - Returns the vector with a maximum length by limiting its length to [code]length[/code]. + 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="cross" qualifiers="const"> @@ -232,6 +234,15 @@ Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> + <method name="limit_length" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="length" type="float" default="1.0"> + </argument> + <description> + Returns the vector with a maximum length by limiting its length to [code]length[/code]. + </description> + </method> <method name="move_toward" qualifiers="const"> <return type="Vector2"> </return> @@ -502,25 +513,25 @@ <constant name="AXIS_Y" value="1"> Enumerated value for the Y axis. </constant> - <constant name="ZERO" value="Vector2( 0, 0 )"> + <constant name="ZERO" value="Vector2(0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. </constant> - <constant name="ONE" value="Vector2( 1, 1 )"> + <constant name="ONE" value="Vector2(1, 1)"> One vector, a vector with all components set to [code]1[/code]. </constant> - <constant name="INF" value="Vector2( inf, inf )"> + <constant name="INF" value="Vector2(inf, inf)"> Infinity vector, a vector with all components set to [constant @GDScript.INF]. </constant> - <constant name="LEFT" value="Vector2( -1, 0 )"> + <constant name="LEFT" value="Vector2(-1, 0)"> Left unit vector. Represents the direction of left. </constant> - <constant name="RIGHT" value="Vector2( 1, 0 )"> + <constant name="RIGHT" value="Vector2(1, 0)"> Right unit vector. Represents the direction of right. </constant> - <constant name="UP" value="Vector2( 0, -1 )"> + <constant name="UP" value="Vector2(0, -1)"> Up unit vector. Y is down in 2D, so this vector points -Y. </constant> - <constant name="DOWN" value="Vector2( 0, 1 )"> + <constant name="DOWN" value="Vector2(0, 1)"> Down unit vector. Y is down in 2D, so this vector points +Y. </constant> </constants> |