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

# rotation(to:)

Returns the rotation around the origin from the first point to the second point.

## Declaration

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

## Parameters

- `other`: The second point that the function computes the rotation to.

## Return Value

Return Value The rotation between two points.

## See Also

### Deprecated symbols

- [origin](spatial/point3d/origin.md)
- [simd](spatial/point3d/simd.md)
