---
title: "SCNMatrix4MakeRotation(_:_:_:_:)"
framework: scenekit
role: symbol
role_heading: Function
path: "scenekit/scnmatrix4makerotation(_:_:_:_:)"
---

# SCNMatrix4MakeRotation(_:_:_:_:)

Returns a matrix describing a rotation transformation.

## Declaration

```swift
func SCNMatrix4MakeRotation(_ angle: Float, _ x: Float, _ y: Float, _ z: Float) -> SCNMatrix4
```

```swift
func SCNMatrix4MakeRotation(_ angle: CGFloat, _ x: CGFloat, _ y: CGFloat, _ z: CGFloat) -> SCNMatrix4
```

## Parameters

- `angle`: The amount of rotation, in radians, measured counterclockwise around the rotation axis.
- `x`: The x-component of the rotation axis.
- `y`: The y-component of the rotation axis.
- `z`: The z-component of the rotation axis.

## Return Value

Return Value A new rotation matrix.

## See Also

### Creating Transform Matrices

- [SCNMatrix4MakeTranslation(_:_:_:)](scenekit/scnmatrix4maketranslation(_:_:_:).md)
- [SCNMatrix4MakeScale(_:_:_:)](scenekit/scnmatrix4makescale(_:_:_:).md)
