Skip to content

Commit

Permalink
Update Rect intersection documentation, and rename method on Mono
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfranke committed Dec 27, 2020
1 parent 3dc52c2 commit 3fda53c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion doc/classes/Rect2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
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.
</description>
</method>
<method name="encloses">
Expand Down
3 changes: 2 additions & 1 deletion doc/classes/Rect2i.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
<argument index="0" name="b" type="Rect2i">
</argument>
<description>
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.
</description>
</method>
<method name="encloses">
Expand Down
5 changes: 3 additions & 2 deletions modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ public Rect2 Abs()

/// <summary>
/// Returns the intersection of this Rect2 and `b`.
/// If the rectangles do not intersect, an empty Rect2 is returned.
/// </summary>
/// <param name="b">The other rect.</param>
/// <returns>The clipped rect.</returns>
public Rect2 Clip(Rect2 b)
/// <returns>The intersection of this Rect2 and `b`, or an empty rect if they do not intersect.</returns>
public Rect2 Intersection(Rect2 b)
{
var newRect = b;

Expand Down
5 changes: 3 additions & 2 deletions modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ public Rect2i Abs()

/// <summary>
/// Returns the intersection of this Rect2i and `b`.
/// If the rectangles do not intersect, an empty Rect2i is returned.
/// </summary>
/// <param name="b">The other rect.</param>
/// <returns>The clipped rect.</returns>
public Rect2i Clip(Rect2i b)
/// <returns>The intersection of this Rect2i and `b`, or an empty rect if they do not intersect.</returns>
public Rect2i Intersection(Rect2i b)
{
var newRect = b;

Expand Down

0 comments on commit 3fda53c

Please sign in to comment.