Skip to content

Commit

Permalink
Fix incorrect example in the documentation for the expand method in R…
Browse files Browse the repository at this point in the history
…ect2
  • Loading branch information
HexagonNico committed May 2, 2024
1 parent f91db3d commit 0854476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/classes/Rect2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@
var rect = Rect2(0, 0, 5, 2)

rect = rect.expand(Vector2(10, 0)) # rect is Rect2(0, 0, 10, 2)
rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 10, 5)
rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 15, 5)
[/gdscript]
[csharp]
var rect = new Rect2(0, 0, 5, 2);

rect = rect.Expand(new Vector2(10, 0)); // rect is Rect2(0, 0, 10, 2)
rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 10, 5)
rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 15, 5)
[/csharp]
[/codeblocks]
</description>
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/Rect2i.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@
var rect = Rect2i(0, 0, 5, 2)

rect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2)
rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 10, 5)
rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 15, 5)
[/gdscript]
[csharp]
var rect = new Rect2I(0, 0, 5, 2);

rect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2)
rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 10, 5)
rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 15, 5)
[/csharp]
[/codeblocks]
</description>
Expand Down

0 comments on commit 0854476

Please sign in to comment.