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

# rotation(to:)

Returns the rotation around @p (0,0,0)  from the first rectangle to the second rectangle.

## Declaration

```swift
func rotation(to other: Rect3D) -> Rotation3D
```

## See Also

### Deprecated symbols

- [distance(to:)](spatial/rect3d/distance(to:).md)
- [containsAny(of:)](spatial/rect3d/containsany(of:).md)
- [maxX](spatial/rect3d/maxx.md)
- [maxY](spatial/rect3d/maxy.md)
- [maxZ](spatial/rect3d/maxz.md)
- [midX](spatial/rect3d/midx.md)
- [midY](spatial/rect3d/midy.md)
- [midZ](spatial/rect3d/midz.md)
- [minX](spatial/rect3d/minx.md)
- [minY](spatial/rect3d/miny.md)
- [minZ](spatial/rect3d/minz.md)
