From 36061c5dca6c45429509f9fe01e8d9d20841d0e6 Mon Sep 17 00:00:00 2001 From: Hendrik Brucker Date: Sun, 7 Aug 2022 12:25:05 +0200 Subject: Vector4/Vector4i: Add missing methods, tests and fix change of sign operator --- doc/classes/Vector4.xml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml index da0df2672e..ee9d97019e 100644 --- a/doc/classes/Vector4.xml +++ b/doc/classes/Vector4.xml @@ -63,6 +63,30 @@ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. + + + + + + + + Performs a cubic interpolation between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + + + + + + + Returns the normalized vector pointing from this vector to [code]to[/code]. This is equivalent to using [code](b - a).normalized()[/code]. + + + + + + + Returns the distance between this vector and [code]to[/code]. + + @@ -133,6 +157,20 @@ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. + + + + + Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code]. + + + + + + + Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components. + + @@ -145,6 +183,13 @@ 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 this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals. + + -- cgit v1.2.3