<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Rotation3D/slerp(from:to:t:along:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "s:So12SPRotation3Da7SpatialE5slerp4from2to1t5alongA2B_ABSdAbCE9SlerpPathOtFZ"
  },
  "title" : "slerp(from:to:t:along:)"
}
-->

# slerp(from:to:t:along:)

Returns the spherical linear interpolation along either the shortest or the longest arc between two rotations.

```
static func slerp(from: Rotation3D, to: Rotation3D, t: Double, along path: Rotation3D.SlerpPath = .shortest) -> Rotation3D
```

## Parameters

`from`

The starting rotation.

`to`

The ending rotation.

`t`

The position along the interpolation that’s between `0` and `1`.

`path`

An enumeration that specifies whether the interpolation should be along the shortest or the longest path between the two rotations.

## Return Value

A new rotation. When `t = 0.0`, the result is the `from` rotation. When `t = 1.0`, the result is the `to` rotation. For any other value of `t`, the result is a spherical linear interpolation between the two rotations.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)