mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Update documentation's "Prints" comments after #47502
This commit is contained in:
@@ -215,7 +215,7 @@
|
||||
<description>
|
||||
Gets the remainder of each component of the [Vector2i] with the components of the given [Vector2i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
||||
[codeblock]
|
||||
print(Vector2i(10, -20) % Vector2i(7, 8)) # Prints "(3, -4)"
|
||||
print(Vector2i(10, -20) % Vector2i(7, 8)) # Prints (3, -4)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</operator>
|
||||
@@ -225,7 +225,7 @@
|
||||
<description>
|
||||
Gets the remainder of each component of the [Vector2i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
||||
[codeblock]
|
||||
print(Vector2i(10, -20) % 7) # Prints "(3, -6)"
|
||||
print(Vector2i(10, -20) % 7) # Prints (3, -6)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</operator>
|
||||
@@ -235,7 +235,7 @@
|
||||
<description>
|
||||
Multiplies each component of the [Vector2i] by the components of the given [Vector2i].
|
||||
[codeblock]
|
||||
print(Vector2i(10, 20) * Vector2i(3, 4)) # Prints "(30, 80)"
|
||||
print(Vector2i(10, 20) * Vector2i(3, 4)) # Prints (30, 80)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</operator>
|
||||
@@ -245,7 +245,7 @@
|
||||
<description>
|
||||
Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].
|
||||
[codeblock]
|
||||
print(Vector2i(10, 15) * 0.9) # Prints "(9, 13.5)"
|
||||
print(Vector2i(10, 15) * 0.9) # Prints (9.0, 13.5)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</operator>
|
||||
@@ -262,7 +262,7 @@
|
||||
<description>
|
||||
Adds each component of the [Vector2i] by the components of the given [Vector2i].
|
||||
[codeblock]
|
||||
print(Vector2i(10, 20) + Vector2i(3, 4)) # Prints "(13, 24)"
|
||||
print(Vector2i(10, 20) + Vector2i(3, 4)) # Prints (13, 24)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</operator>
|
||||
@@ -272,7 +272,7 @@
|
||||
<description>
|
||||
Subtracts each component of the [Vector2i] by the components of the given [Vector2i].
|
||||
[codeblock]
|
||||
print(Vector2i(10, 20) - Vector2i(3, 4)) # Prints "(7, 16)"
|
||||
print(Vector2i(10, 20) - Vector2i(3, 4)) # Prints (7, 16)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</operator>
|
||||
@@ -282,7 +282,7 @@
|
||||
<description>
|
||||
Divides each component of the [Vector2i] by the components of the given [Vector2i].
|
||||
[codeblock]
|
||||
print(Vector2i(10, 20) / Vector2i(2, 5)) # Prints "(5, 4)"
|
||||
print(Vector2i(10, 20) / Vector2i(2, 5)) # Prints (5, 4)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</operator>
|
||||
@@ -292,7 +292,7 @@
|
||||
<description>
|
||||
Divides each component of the [Vector2i] by the given [float]. Returns a [Vector2].
|
||||
[codeblock]
|
||||
print(Vector2i(10, 20) / 2.9) # Prints "(5, 10)"
|
||||
print(Vector2i(10, 20) / 2.9) # Prints (5.0, 10.0)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</operator>
|
||||
|
||||
Reference in New Issue
Block a user