diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 8feeb91b9762..34f81948c488 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -78,7 +78,8 @@ - Returns the intersection of this [Rect2] and b. + Returns the intersection of this [Rect2] and [code]b[/code]. + If the rectangles do not intersect, an empty [Rect2] is returned. diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index 80f2a87f31cf..d354adf892c5 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -76,7 +76,8 @@ - Returns the intersection of this [Rect2i] and b. + Returns the intersection of this [Rect2i] and [code]b[/code]. + If the rectangles do not intersect, an empty [Rect2i] is returned. diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs index f7703c77cc42..a4f6f7d5ec98 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs @@ -74,10 +74,11 @@ public Rect2 Abs() /// /// Returns the intersection of this Rect2 and `b`. + /// If the rectangles do not intersect, an empty Rect2 is returned. /// /// The other rect. - /// The clipped rect. - public Rect2 Clip(Rect2 b) + /// The intersection of this Rect2 and `b`, or an empty rect if they do not intersect. + public Rect2 Intersection(Rect2 b) { var newRect = b; diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs index 8f71c00d7684..ed29fb144c9f 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs @@ -69,10 +69,11 @@ public Rect2i Abs() /// /// Returns the intersection of this Rect2i and `b`. + /// If the rectangles do not intersect, an empty Rect2i is returned. /// /// The other rect. - /// The clipped rect. - public Rect2i Clip(Rect2i b) + /// The intersection of this Rect2i and `b`, or an empty rect if they do not intersect. + public Rect2i Intersection(Rect2i b) { var newRect = b;