You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-04 17:04:49 +00:00
Merge pull request #44582 from nathanfranke/document-rect-intersection
Update Rect intersection documentation, and rename method on Mono
This commit is contained in:
@@ -78,7 +78,8 @@
|
|||||||
<argument index="0" name="b" type="Rect2">
|
<argument index="0" name="b" type="Rect2">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="encloses">
|
<method name="encloses">
|
||||||
|
|||||||
@@ -76,7 +76,8 @@
|
|||||||
<argument index="0" name="b" type="Rect2i">
|
<argument index="0" name="b" type="Rect2i">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="encloses">
|
<method name="encloses">
|
||||||
|
|||||||
@@ -74,10 +74,11 @@ namespace Godot
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the intersection of this Rect2 and `b`.
|
/// Returns the intersection of this Rect2 and `b`.
|
||||||
|
/// If the rectangles do not intersect, an empty Rect2 is returned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="b">The other rect.</param>
|
/// <param name="b">The other rect.</param>
|
||||||
/// <returns>The clipped rect.</returns>
|
/// <returns>The intersection of this Rect2 and `b`, or an empty rect if they do not intersect.</returns>
|
||||||
public Rect2 Clip(Rect2 b)
|
public Rect2 Intersection(Rect2 b)
|
||||||
{
|
{
|
||||||
var newRect = b;
|
var newRect = b;
|
||||||
|
|
||||||
|
|||||||
@@ -69,10 +69,11 @@ namespace Godot
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the intersection of this Rect2i and `b`.
|
/// Returns the intersection of this Rect2i and `b`.
|
||||||
|
/// If the rectangles do not intersect, an empty Rect2i is returned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="b">The other rect.</param>
|
/// <param name="b">The other rect.</param>
|
||||||
/// <returns>The clipped rect.</returns>
|
/// <returns>The intersection of this Rect2i and `b`, or an empty rect if they do not intersect.</returns>
|
||||||
public Rect2i Clip(Rect2i b)
|
public Rect2i Intersection(Rect2i b)
|
||||||
{
|
{
|
||||||
var newRect = b;
|
var newRect = b;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user