---
title: "SCNMatrix4Rotate(_:_:_:_:_:)"
framework: scenekit
role: symbol
role_heading: Function
path: "scenekit/scnmatrix4rotate(_:_:_:_:_:)"
---

# SCNMatrix4Rotate(_:_:_:_:_:)

Returns a new matrix created by concatenating the specified matrix with a rotation transformation.

## Declaration

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

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

## Parameters

- `m`: The matrix to be combined with a rotation.
- `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 matrix.

## Discussion

Discussion The resulting transformation consists of the specified rotation followed by the transformation represented by the mat parameter.

## See Also

### Performing Matrix Operations

- [SCNMatrix4Translate(_:_:_:_:)](scenekit/scnmatrix4translate(_:_:_:_:).md)
- [SCNMatrix4Scale(_:_:_:_:)](scenekit/scnmatrix4scale(_:_:_:_:).md)
- [SCNMatrix4Invert(_:)](scenekit/scnmatrix4invert(_:).md)
- [SCNMatrix4Mult(_:_:)](scenekit/scnmatrix4mult(_:_:).md)
