diff options
Diffstat (limited to 'doc/classes/Vector2i.xml')
-rw-r--r-- | doc/classes/Vector2i.xml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index eab880e57f..db6bc8f237 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -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> @@ -92,7 +92,14 @@ <method name="sign" qualifiers="const"> <return type="Vector2i" /> <description> - Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. + Returns a new vector with each component set to [code]1[/code] if it's positive, [code]-1[/code] if it's negative, and [code]0[/code] if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component. + </description> + </method> + <method name="snapped" qualifiers="const"> + <return type="Vector2i" /> + <param index="0" name="step" type="Vector2i" /> + <description> + Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step]. </description> </method> </methods> |