<!--
{
  "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/swingTwist(twistAxis:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "s:So12SPRotation3Da7SpatialE10swingTwist9twistAxisAB0C0_AB0E0tSo16SPRotationAxis3Da_tF"
  },
  "title" : "swingTwist(twistAxis:)"
}
-->

# swingTwist(twistAxis:)

Returns the rotation’s swing-twist decomposition for a given twist axis.

```
func swingTwist(twistAxis: RotationAxis3D) -> (swing: Rotation3D, twist: Rotation3D)
```

## Parameters

`twistAxis`

The twist axis.

## Return Value

A tuple that contains the swing rotation and the twist rotation.

---

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)