---
title: "CATransform3DMakeRotation(_:_:_:_:)"
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/catransform3dmakerotation(_:_:_:_:)"
---

# CATransform3DMakeRotation(_:_:_:_:)

Returns a transform that rotates by angle radians about the vector (x, y, z).

## Declaration

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

## Discussion

Discussion If the vector has length zero, this function returns the identity transform.

## See Also

### Creating Transforms

- [CATransform3DMakeTranslation(_:_:_:)](quartzcore/catransform3dmaketranslation(_:_:_:).md)
- [CATransform3DMakeScale(_:_:_:)](quartzcore/catransform3dmakescale(_:_:_:).md)
