---
title: "CATransform3DRotate(_:_:_:_:_:)"
framework: Core Animation
role: symbol
role_heading: Function
platforms: [iOS 2.0+, iPadOS 2.0+, Mac Catalyst 13.1+, macOS 10.5+, tvOS 9.0+, visionOS 1.0+]
path: "quartzcore/catransform3drotate(_:_:_:_:_:)"
---

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

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

## Declaration

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

## Discussion

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

## See Also

### Chaining Transforms

- [CATransform3DConcat(_:_:)](quartzcore/catransform3dconcat(_:_:).md)
- [CATransform3DTranslate(_:_:_:_:)](quartzcore/catransform3dtranslate(_:_:_:_:).md)
- [CATransform3DScale(_:_:_:_:)](quartzcore/catransform3dscale(_:_:_:_:).md)
