summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-04-08 12:00:54 +0200
committerGitHub <noreply@github.com>2019-04-08 12:00:54 +0200
commit7f3373d79f017c17ad5ffd0eba877fc056ad649b (patch)
treeb78f9874fe96e979edf8cab43da744dcb94bd0ab /doc/classes
parenta994db62df731879bb9c54e65b4ddca32396e9d3 (diff)
parent55f3bd97a270b691c26d6eda70bc7c0a3ec8f4e8 (diff)
Merge pull request #27452 from Chaosus/direction_to
Added method to retrieve a direction vector from one point to another
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Vector2.xml9
-rw-r--r--doc/classes/Vector3.xml9
2 files changed, 18 insertions, 0 deletions
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index f1fd0173fe..2f4d3fe3dc 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -112,6 +112,15 @@
Cubicly interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
</description>
</method>
+ <method name="direction_to">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="b" type="Vector2">
+ </argument>
+ <description>
+ Returns the normalized vector pointing from this vector to [code]b[/code].
+ </description>
+ </method>
<method name="distance_squared_to">
<return type="float">
</return>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 7b0d1c5a97..f1363f4fad 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -81,6 +81,15 @@
Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
</description>
</method>
+ <method name="direction_to">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="b" type="Vector3">
+ </argument>
+ <description>
+ Returns the normalized vector pointing from this vector to [code]b[/code].
+ </description>
+ </method>
<method name="distance_squared_to">
<return type="float">
</return>