Skip to content

Commit a0b0b19

Browse files
committed
Merge pull request #91446 from HexagonNico/rect-doc-fix
Fix incorrect example in the documentation for the `expand` method in `Rect2`
2 parents b2af040 + 0854476 commit a0b0b19

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

doc/classes/Rect2.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@
8989
var rect = Rect2(0, 0, 5, 2)
9090

9191
rect = rect.expand(Vector2(10, 0)) # rect is Rect2(0, 0, 10, 2)
92-
rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 10, 5)
92+
rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 15, 5)
9393
[/gdscript]
9494
[csharp]
9595
var rect = new Rect2(0, 0, 5, 2);
9696

9797
rect = rect.Expand(new Vector2(10, 0)); // rect is Rect2(0, 0, 10, 2)
98-
rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 10, 5)
98+
rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 15, 5)
9999
[/csharp]
100100
[/codeblocks]
101101
</description>

doc/classes/Rect2i.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@
8888
var rect = Rect2i(0, 0, 5, 2)
8989

9090
rect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2)
91-
rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 10, 5)
91+
rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 15, 5)
9292
[/gdscript]
9393
[csharp]
9494
var rect = new Rect2I(0, 0, 5, 2);
9595

9696
rect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2)
97-
rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 10, 5)
97+
rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 15, 5)
9898
[/csharp]
9999
[/codeblocks]
100100
</description>

0 commit comments

Comments
 (0)