From 0854476ef1b504ce3f8b9bbecb00ebcb4ba3d1e5 Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 2 May 2024 09:56:53 +0200 Subject: [PATCH] Fix incorrect example in the documentation for the expand method in Rect2 --- doc/classes/Rect2.xml | 4 ++-- doc/classes/Rect2i.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 0471d73749a..ba7dcab2d76 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -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] diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index c021a1be26f..cbd09f84304 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -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]