From c00427add34f505cff275ea33423f1053423d646 Mon Sep 17 00:00:00 2001 From: Giacom Date: Sun, 7 Apr 2019 22:40:56 +0100 Subject: Added move_toward functions for float, Vector2 and Vector3 --- doc/classes/@GDScript.xml | 17 +++++++++++++++++ doc/classes/Vector2.xml | 11 +++++++++++ doc/classes/Vector3.xml | 11 +++++++++++ 3 files changed, 39 insertions(+) (limited to 'doc/classes') 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] + + + + + + + + + + + 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] + + diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 75221ccc82..eff8b0680e 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -185,6 +185,17 @@ Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + + + + + + + + + Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount. + + diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index bcd745945e..86603d60cc 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -175,6 +175,17 @@ Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. + + + + + + + + + Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount. + + -- cgit v1.2.3