diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-08-11 19:11:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 19:11:59 +0200 |
commit | d0d75f0627c70914c23a6b1ed5c969bebe777c9d (patch) | |
tree | 60c8f6a0ab1c7018811f2ac7e7d15f0f14bff8a6 /doc/classes | |
parent | 149dbfc144efd6d52f1a579280545114e0c6ed7b (diff) | |
parent | a09078e64bf56577f22ab9da7276ee5a82d9dd8c (diff) |
Merge pull request #41008 from KoBeWi/∠
Improve Vector2.angle() description
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Vector2.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index c0d8628d88..11716f511b 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -43,7 +43,8 @@ <return type="float"> </return> <description> - Returns this vector's angle with respect to the X axis, or [code](1, 0)[/code] vector, in radians. + Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians. + For example, [code]Vector2.RIGHT.angle()[/code] will return zero, [code]Vector2.DOWN.angle()[/code] will return [code]PI / 2[/code] (a quarter turn, or 90 degrees), and [code]Vector2(1, -1).angle()[/code] will return [code]-PI / 4[/code] (a negative eighth turn, or -45 degrees). Equivalent to the result of [method @GDScript.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code]. </description> </method> |