diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2021-11-04 10:58:20 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-11-04 14:44:55 -0500 |
commit | 813466b3c893ce2d47098268475818d1e4e485b4 (patch) | |
tree | b5f15a25d9680d88d08bb37f8afe67f5fc6fe3e9 /doc/classes/Quaternion.xml | |
parent | ee939c919b14a1935a0b6ccde338846a14cb9744 (diff) | |
download | redot-engine-813466b3c893ce2d47098268475818d1e4e485b4.tar.gz |
Add documentation to operators for math types
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Diffstat (limited to 'doc/classes/Quaternion.xml')
-rw-r--r-- | doc/classes/Quaternion.xml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index 95b2316bf3..4b787b31c7 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -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> |