Merge pull request #68579 from jtnicholl/float_doc

Document that `Vector#` types are 32-bit by default and `Vector#i` are always 32-bit
This commit is contained in:
Rémi Verschelde 2022-11-22 12:36:35 +01:00
commit 876ea3e143
No known key found for this signature in database
GPG Key ID: C3336907360768E1
6 changed files with 9 additions and 6 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 floating-point coordinates. See [Vector2i] for its integer counterpart.
It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code].
See [Vector2i] for its integer counterpart.
[b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code].
</description>
<tutorials>

View File

@ -5,7 +5,7 @@
</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 and is therefore preferable to [Vector2] when exact precision is required.
It uses integer coordinates and is therefore preferable to [Vector2] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector2] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed.
[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>

View File

@ -5,7 +5,8 @@
</brief_description>
<description>
3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values.
It uses floating-point coordinates. See [Vector3i] for its integer counterpart.
It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code].
See [Vector3i] for its integer counterpart.
[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code].
</description>
<tutorials>

View File

@ -5,7 +5,7 @@
</brief_description>
<description>
3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values.
It uses integer coordinates and is therefore preferable to [Vector3] when exact precision is required.
It uses integer coordinates and is therefore preferable to [Vector3] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector3] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed.
[b]Note:[/b] In a boolean context, a Vector3i will evaluate to [code]false[/code] if it's equal to [code]Vector3i(0, 0, 0)[/code]. Otherwise, a Vector3i will always evaluate to [code]true[/code].
</description>
<tutorials>

View File

@ -5,7 +5,8 @@
</brief_description>
<description>
4-element structure that can be used to represent any quadruplet of numeric values.
It uses floating-point coordinates. See [Vector4i] for its integer counterpart.
It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code].
See [Vector4i] for its integer counterpart.
[b]Note:[/b] In a boolean context, a Vector4 will evaluate to [code]false[/code] if it's equal to [code]Vector4(0, 0, 0, 0)[/code]. Otherwise, a Vector4 will always evaluate to [code]true[/code].
</description>
<tutorials>

View File

@ -5,7 +5,7 @@
</brief_description>
<description>
4-element structure that can be used to represent 4D grid coordinates or sets of integers.
It uses integer coordinates. See [Vector4] for its floating-point counterpart.
It uses integer coordinates and is therefore preferable to [Vector4] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector4] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed.
</description>
<tutorials>
</tutorials>