mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Add documentation to operators for math types
Co-authored-by: Raul Santos <raulsntos@gmail.com>
This commit is contained in:
@@ -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 *">
|
||||
|
||||
Reference in New Issue
Block a user