<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CATransform3DRotate(_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:@F@CATransform3DRotate"
  },
  "title" : "CATransform3DRotate(_:_:_:_:_:)"
}
-->

# CATransform3DRotate(_:_:_:_:_:)

Rotates `t` by `angle` radians about the vector `(x, y, z)` and returns the result.

```
func CATransform3DRotate(_ t: CATransform3D, _ angle: CGFloat, _ x: CGFloat, _ y: CGFloat, _ z: CGFloat) -> CATransform3D
```

## Discussion

If the vector has zero length, the behavior is undefined: `t` = `rotation(angle, x, y, z) * t`.

---

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)