|
59 | 59 | <description> |
60 | 60 | Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians. |
61 | 61 | 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). |
| 62 | + This is equivalent to calling [method @GlobalScope.atan2] with [member y] and [member x]. |
62 | 63 | [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle.png]Illustration of the returned angle.[/url] |
63 | | - Equivalent to the result of [method @GlobalScope.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code]. |
64 | 64 | </description> |
65 | 65 | </method> |
66 | 66 | <method name="angle_to" qualifiers="const"> |
67 | 67 | <return type="float" /> |
68 | 68 | <param index="0" name="to" type="Vector2" /> |
69 | 69 | <description> |
70 | | - Returns the signed angle to the given vector, in radians. |
| 70 | + Returns the signed angle to the given vector, in radians. The result ranges from [code]-PI[/code] to [code]PI[/code] (inclusive). |
71 | 71 | [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to.png]Illustration of the returned angle.[/url] |
72 | 72 | </description> |
73 | 73 | </method> |
74 | 74 | <method name="angle_to_point" qualifiers="const"> |
75 | 75 | <return type="float" /> |
76 | 76 | <param index="0" name="to" type="Vector2" /> |
77 | 77 | <description> |
78 | | - Returns the angle between the line connecting the two points and the X axis, in radians. |
79 | | - [code]a.angle_to_point(b)[/code] is equivalent of doing [code](b - a).angle()[/code]. |
| 78 | + Returns the signed angle between the X axis and the line from this vector to point [param to], in radians. The result ranges from [code]-PI[/code] to [code]PI[/code] (inclusive). |
| 79 | + [code]a.angle_to_point(b)[/code] is equivalent to [code](b - a).angle()[/code]. See also [method angle]. |
80 | 80 | [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to_point.png]Illustration of the returned angle.[/url] |
81 | 81 | </description> |
82 | 82 | </method> |
83 | 83 | <method name="aspect" qualifiers="const"> |
84 | 84 | <return type="float" /> |
85 | 85 | <description> |
86 | | - Returns the aspect ratio of this vector, the ratio of [member x] to [member y]. |
| 86 | + Returns this vector's aspect ratio, which is [member x] divided by [member y]. |
87 | 87 | </description> |
88 | 88 | </method> |
89 | 89 | <method name="bezier_derivative" qualifiers="const"> |
|
173 | 173 | <return type="Vector2" /> |
174 | 174 | <param index="0" name="to" type="Vector2" /> |
175 | 175 | <description> |
176 | | - Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using [code](b - a).normalized()[/code]. |
| 176 | + Returns the normalized vector pointing from this vector to [param to]. |
| 177 | + [code]a.direction_to(b)[/code] is equivalent to [code](b - a).normalized()[/code]. See also [method normalized]. |
177 | 178 | </description> |
178 | 179 | </method> |
179 | 180 | <method name="distance_squared_to" qualifiers="const"> |
|
0 commit comments