Add documentation to operators for math types

Co-authored-by: Raul Santos <raulsntos@gmail.com>
This commit is contained in:
Aaron Franke
2021-11-04 10:58:20 -05:00
parent ee939c919b
commit 813466b3c8
31 changed files with 1367 additions and 91 deletions

View File

@@ -72,7 +72,7 @@
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
Multiplies each component of the [Quaternion] by the given [float].
Multiplies each component of the [Quaternion] by the given [float]. 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 *">
@@ -81,7 +81,7 @@
<description>
Multiplies each component of the [Vector2] by the given [float].
[codeblock]
print(2.5 * Vector2(1, 1)) # Vector2(2.5, 2.5)
print(2.5 * Vector2(1, 3)) # Prints "(2.5, 7.5)"
[/codeblock]
</description>
</operator>
@@ -89,9 +89,9 @@
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
Multiplies each component of the [Vector2i] by the given [float].
Multiplies each component of the [Vector2i] by the given [float] truncated to an integer.
[codeblock]
print(2.0 * Vector2i(1, 1)) # Vector2i(2.0, 2.0)
print(0.9 * Vector2i(10, 20)) # Prints "(0, 0)"
[/codeblock]
</description>
</operator>
@@ -106,7 +106,10 @@
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
Multiplies each component of the [Vector3i] by the given [float].
Multiplies each component of the [Vector3i] by the given [float] truncated to an integer.
[codeblock]
print(0.9 * Vector3i(10, 20, 30)) # Prints "(0, 0, 0)"
[/codeblock]
</description>
</operator>
<operator name="operator *">