# Sandbox.Rect.Intersect

```csharp
static Rect Intersect(in Rect a, in Rect b)
```

Returns the intersection of two rectangles without changing either input.
Touching edges produce a zero dimension; disjoint edges produce a negative dimension.
The result is not normalized, so an empty intersection stays empty when intersected again.

### Parameters

- `in a` (`Rect`)
- `in b` (`Rect`)

### Returns

`Rect`

Declared in [Sandbox.Rect](/api/Sandbox.Rect).
Assembly: `Sandbox.System`.
