Skip to content

Commit

Permalink
Merge pull request #78212 from timothyqiu/move-towards
Browse files Browse the repository at this point in the history
Clarify `move_towards` does not go past final value
  • Loading branch information
akien-mga committed Jun 14, 2023
2 parents 754a52a + 09767d5 commit a2575cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/classes/@GlobalScope.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit a2575cb

Please sign in to comment.