Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rect intersection documentation, and rename method on Mono #44582

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)
nathanfranke marked this conversation as resolved.
Show resolved Hide resolved
/// <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)
nathanfranke marked this conversation as resolved.
Show resolved Hide resolved
/// <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