---
title: "intersection(_:)"
framework: spatial
role: symbol
role_heading: Instance Method
path: "spatial/rect3d/intersection(_:)"
---

# intersection(_:)

Returns the intersection of two rectangles.

## Declaration

```swift
func intersection(_ other: Rect3D) -> Rect3D?
```

## Parameters

- `other`: The rectangle that the function compares against.

## Return Value

Return Value A new rectangle that is the intersection of two rectangles.

## See Also

### Creating derived 3D rectangles

- [integral](spatial/rect3d/integral.md)
- [formInset(by:)](spatial/rect3d/forminset(by:).md)
- [inset(by:)](spatial/rect3d/inset(by:).md)
- [standardized](spatial/rect3d/standardized.md)
