Document how Vector2, Vector3 and Color behave in a boolean context

See #39731.
This commit is contained in:
Hugo Locurcio
2020-06-21 17:16:10 +02:00
parent 277d2f1f50
commit 227f12478d
5 changed files with 10 additions and 5 deletions

View File

@@ -5,7 +5,8 @@
</brief_description>
<description>
2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
It uses integer coordinates.
It uses integer coordinates and is therefore preferable to [Vector2] when exact precision is required.
[b]Note:[/b] In a boolean context, a Vector2i will evaluate to [code]false[/code] if it's equal to [code]Vector2i(0, 0)[/code]. Otherwise, a Vector2i will always evaluate to [code]true[/code].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>