summaryrefslogtreecommitdiff
path: root/doc/classes/Quaternion.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Quaternion.xml')
-rw-r--r--doc/classes/Quaternion.xml17
1 files changed, 16 insertions, 1 deletions
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 95b2316bf3..9fa2d9b60b 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -9,7 +9,7 @@
Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors.
</description>
<tutorials>
- <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
+ <link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<constructors>
@@ -195,54 +195,64 @@
<return type="bool" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Returns [code]true[/code] if the quaternions are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Composes these two quaternions by multiplying them together. This has the effect of rotating the second quaternion (the child) by the first quaternion (the parent).
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Rotates (multiplies) the [Vector3] by the given [Quaternion].
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator +">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Adds each component of the left [Quaternion] to the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations.
</description>
</operator>
<operator name="operator -">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Subtracts each component of the left [Quaternion] by the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator /">
<return type="Quaternion" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator /">
<return type="Quaternion" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator ==">
@@ -254,22 +264,27 @@
<return type="bool" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Returns [code]true[/code] if the quaternions are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator []">
<return type="float" />
<argument index="0" name="index" type="int" />
<description>
+ Access quaternion components using their index. [code]q[0][/code] is equivalent to [code]q.x[/code], [code]q[1][/code] is equivalent to [code]q.y[/code], [code]q[2][/code] is equivalent to [code]q.z[/code], and [code]q[3][/code] is equivalent to [code]q.w[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Quaternion" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Quaternion" />
<description>
+ Returns the negative value of the [Quaternion]. This is the same as writing [code]Quaternion(-q.x, -q.y, -q.z, -q.w)[/code]. This operation results in a quaternion that represents the same rotation.
</description>
</operator>
</operators>