intersection


Description:

public bool intersection (Rect b, out Rect res)

Computes the intersection of the two given rectangles.

![](rectangle-intersection.png)

The intersection in the image above is the blue outline.

If the two rectangles do not intersect, res will contain a degenerate rectangle with origin in (0, 0) and a size of 0.

Parameters:

this

a Rect

b

a Rect

res

return location for a Rect

Returns:

`true` if the two rectangles intersect