<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Rotation3DFloat/swingTwist(twistAxis:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "s:So17SPRotation3DFloata7SpatialE10swingTwist9twistAxisAB0D0_AB0F0tSo015SPRotationAxis3B0a_tF"
  },
  "title" : "swingTwist(twistAxis:)"
}
-->

# swingTwist(twistAxis:)

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

```
func swingTwist(twistAxis: RotationAxis3DFloat) -> (swing: Rotation3DFloat, twist: Rotation3DFloat)
```

## Return Value

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

## Discussion

- Parameter twistAxis The twist axis.

---

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)