Merge pull request #78212 from timothyqiu/move-towards

Clarify `move_towards` does not go past final value
This commit is contained in:
Rémi Verschelde 2023-06-14 09:27:57 +02:00
commit a2575cba48
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -725,11 +725,12 @@
<param index="1" name="to" type="float" />
<param index="2" name="delta" type="float" />
<description>
Moves [param from] toward [param to] by the [param delta] value.
Moves [param from] toward [param to] by the [param delta] amount. Will not go past [param to].
Use a negative [param delta] value to move away.
[codeblock]
move_toward(5, 10, 4) # Returns 9
move_toward(10, 5, 4) # Returns 6
move_toward(5, 10, 9) # Returns 10
move_toward(10, 5, -1.5) # Returns 11.5
[/codeblock]
</description>