summaryrefslogtreecommitdiff
path: root/doc/classes/Vector4.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Vector4.xml')
-rw-r--r--doc/classes/Vector4.xml19
1 files changed, 13 insertions, 6 deletions
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index fdc93f82ec..c811817bdc 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -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]precision=double[/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>
@@ -135,6 +136,12 @@
Returns [code]true[/code] if this vector and [param with] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
@@ -183,21 +190,21 @@
<method name="normalized" qualifiers="const">
<return type="Vector4" />
<description>
- Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
+ Returns the result of scaling the vector to unit length. Equivalent to [code]v / v.length()[/code].
</description>
</method>
<method name="posmod" qualifiers="const">
<return type="Vector4" />
<param index="0" name="mod" type="float" />
<description>
- Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod].
+ Returns a new vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod].
</description>
</method>
<method name="posmodv" qualifiers="const">
<return type="Vector4" />
<param index="0" name="modv" type="Vector4" />
<description>
- Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components.
+ Returns a new vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components.
</description>
</method>
<method name="round" qualifiers="const">
@@ -209,14 +216,14 @@
<method name="sign" qualifiers="const">
<return type="Vector4" />
<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.0[/code] if it's positive, [code]-1.0[/code] if it's negative, and [code]0.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="Vector4" />
<param index="0" name="step" type="Vector4" />
<description>
- Returns this vector with each component snapped to the nearest multiple of [param step]. This can also be used to round to an arbitrary number of decimals.
+ Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals.
</description>
</method>
</methods>