Merge pull request #78212 from timothyqiu/move-towards
Clarify `move_towards` does not go past final value
This commit is contained in:
commit
a2575cba48
1 changed files with 2 additions and 1 deletions
|
@ -725,11 +725,12 @@
|
||||||
<param index="1" name="to" type="float" />
|
<param index="1" name="to" type="float" />
|
||||||
<param index="2" name="delta" type="float" />
|
<param index="2" name="delta" type="float" />
|
||||||
<description>
|
<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.
|
Use a negative [param delta] value to move away.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
move_toward(5, 10, 4) # Returns 9
|
move_toward(5, 10, 4) # Returns 9
|
||||||
move_toward(10, 5, 4) # Returns 6
|
move_toward(10, 5, 4) # Returns 6
|
||||||
|
move_toward(5, 10, 9) # Returns 10
|
||||||
move_toward(10, 5, -1.5) # Returns 11.5
|
move_toward(10, 5, -1.5) # Returns 11.5
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
|
|
Loading…
Reference in a new issue