# Encompass(Rect, Rect)

> Create rectangle that encompasses two rectangles.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Experimental.GraphView](/engine/6000.3/script-reference/unityeditor/experimental/graphview.md)
* **Assembly:** UnityEditor

```csharp
public static Rect Encompass(Rect a, Rect b)
```

### Parameters

**** (\[Rect]\(/engine/6000.3/script-reference/unityengine/rect)): Rect a.**** (\[Rect]\(/engine/6000.3/script-reference/unityengine/rect)): Rect b.

### Returns

| Type                                                        | Description    |
| ----------------------------------------------------------- | -------------- |
| [Rect](/engine/6000.3/script-reference/unityengine/rect.md) | New rectangle. |
