summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHendrik Brucker <hendrik.brucker@mail.de>2022-08-07 12:25:05 +0200
committerHendrik Brucker <hendrik.brucker@mail.de>2022-08-07 12:25:05 +0200
commit36061c5dca6c45429509f9fe01e8d9d20841d0e6 (patch)
treed26b02cdc32fd02599bf75504e113ec6e47caf4d /doc
parent21f6916ffc52d83ac57b4f412f3eb8d6b40afebe (diff)
Vector4/Vector4i: Add missing methods, tests and fix change of sign operator
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Vector4.xml45
1 files changed, 45 insertions, 0 deletions
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.
</description>
</method>
+ <method name="cubic_interpolate" qualifiers="const">
+ <return type="Vector4" />
+ <argument index="0" name="b" type="Vector4" />
+ <argument index="1" name="pre_a" type="Vector4" />
+ <argument index="2" name="post_b" type="Vector4" />
+ <argument index="3" name="weight" type="float" />
+ <description>
+ 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.
+ </description>
+ </method>
+ <method name="direction_to" qualifiers="const">
+ <return type="Vector4" />
+ <argument index="0" name="to" type="Vector4" />
+ <description>
+ Returns the normalized vector pointing from this vector to [code]to[/code]. This is equivalent to using [code](b - a).normalized()[/code].
+ </description>
+ </method>
+ <method name="distance_to" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="to" type="Vector4" />
+ <description>
+ Returns the distance between this vector and [code]to[/code].
+ </description>
+ </method>
<method name="dot" qualifiers="const">
<return type="float" />
<argument index="0" name="with" type="Vector4" />
@@ -133,6 +157,20 @@
Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
</description>
</method>
+ <method name="posmod" qualifiers="const">
+ <return type="Vector4" />
+ <argument index="0" name="mod" type="float" />
+ <description>
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code].
+ </description>
+ </method>
+ <method name="posmodv" qualifiers="const">
+ <return type="Vector4" />
+ <argument index="0" name="modv" type="Vector4" />
+ <description>
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components.
+ </description>
+ </method>
<method name="round" qualifiers="const">
<return type="Vector4" />
<description>
@@ -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.
</description>
</method>
+ <method name="snapped" qualifiers="const">
+ <return type="Vector4" />
+ <argument index="0" name="step" type="Vector4" />
+ <description>
+ 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.
+ </description>
+ </method>
</methods>
<members>
<member name="w" type="float" setter="" getter="" default="0.0">