diff options
Diffstat (limited to 'doc/classes/Vector4.xml')
-rw-r--r-- | doc/classes/Vector4.xml | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml index 46005f8373..a2759937c1 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]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> @@ -28,7 +29,7 @@ <return type="Vector4" /> <param index="0" name="from" type="Vector4i" /> <description> - Constructs a new [Vector4] from [Vector4i]. + Constructs a new [Vector4] from the given [Vector4i]. </description> </constructor> <constructor name="Vector4"> @@ -73,6 +74,20 @@ Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> + <method name="cubic_interpolate_in_time" qualifiers="const"> + <return type="Vector4" /> + <param index="0" name="b" type="Vector4" /> + <param index="1" name="pre_a" type="Vector4" /> + <param index="2" name="post_b" type="Vector4" /> + <param index="3" name="weight" type="float" /> + <param index="4" name="b_t" type="float" /> + <param index="5" name="pre_a_t" type="float" /> + <param index="6" name="post_b_t" type="float" /> + <description> + Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. + It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values. + </description> + </method> <method name="direction_to" qualifiers="const"> <return type="Vector4" /> <param index="0" name="to" type="Vector4" /> @@ -84,7 +99,7 @@ <return type="float" /> <param index="0" name="to" type="Vector4" /> <description> - Returns the squared distance between this vector and [code]to[/code]. + Returns the squared distance between this vector and [param to]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> @@ -121,12 +136,25 @@ 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> Returns [code]true[/code] if the vector is normalized, i.e. its length is equal to 1. </description> </method> + <method name="is_zero_approx" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component. + This method is faster than using [method is_equal_approx] with one value as a zero vector. + </description> + </method> <method name="length" qualifiers="const"> <return type="float" /> <description> |