diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-01 12:05:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-01 12:05:18 +0200 |
commit | 3c4fab295b96c9bd852601531bf35c1ade56b54c (patch) | |
tree | 9adcec083a49ca4935ff70e1257bd492ca88df62 /doc/classes/@GDScript.xml | |
parent | 64a88e8ef35d692f31d6114793468623c6756785 (diff) | |
parent | c00427add34f505cff275ea33423f1053423d646 (diff) |
Merge pull request #27789 from Giacom/move_towards
Added move_toward functions for float, Vector2 and Vector3
Diffstat (limited to 'doc/classes/@GDScript.xml')
-rw-r--r-- | doc/classes/@GDScript.xml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index 63b9ef13fd..553fd4d629 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -640,6 +640,23 @@ [/codeblock] </description> </method> + <method name="move_toward"> + <return type="float"> + </return> + <argument index="0" name="from" type="float"> + </argument> + <argument index="1" name="to" type="float"> + </argument> + <argument index="2" name="delta" type="float"> + </argument> + <description> + Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value. + Use a negative [code]delta[/code] value to move away. + [codeblock] + move_toward(10, 5, 4) # returns 6 + [/codeblock] + </description> + </method> <method name="nearest_po2"> <return type="int"> </return> |