---
title: "GLKMatrix4MakeRotation(_:_:_:_:)"
framework: GLKit
role: symbol
role_heading: Function
platforms: [iOS 5.0+, iPadOS 5.0+, macOS 10.8+, tvOS 9.0+]
path: "glkit/glkmatrix4makerotation(_:_:_:_:)"
---

# GLKMatrix4MakeRotation(_:_:_:_:)

Returns a 4x4 matrix that performs a rotation around an arbitrary vector.

## Declaration

```swift
func GLKMatrix4MakeRotation(_ radians: Float, _ x: Float, _ y: Float, _ z: Float) -> GLKMatrix4
```

## Parameters

- `radians`: The angle of the rotation (a positive angle is counterclockwise).
- `x`: The x component of the rotation vector.
- `y`: The y component of the rotation vector.
- `z`: The z component of the rotation vector.

## Return Value

Return Value A new rotation matrix.

## See Also

### Creating Matrices

- [GLKMatrix4Make(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)](glkit/glkmatrix4make(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:).md)
- [GLKMatrix4MakeAndTranspose(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)](glkit/glkmatrix4makeandtranspose(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:).md)
- [GLKMatrix4MakeWithArray(_:)](glkit/glkmatrix4makewitharray(_:).md)
- [GLKMatrix4MakeWithArrayAndTranspose(_:)](glkit/glkmatrix4makewitharrayandtranspose(_:).md)
- [GLKMatrix4MakeWithColumns(_:_:_:_:)](glkit/glkmatrix4makewithcolumns(_:_:_:_:).md)
- [GLKMatrix4MakeWithRows(_:_:_:_:)](glkit/glkmatrix4makewithrows(_:_:_:_:).md)
- [GLKMatrix4MakeXRotation(_:)](glkit/glkmatrix4makexrotation(_:).md)
- [GLKMatrix4MakeYRotation(_:)](glkit/glkmatrix4makeyrotation(_:).md)
- [GLKMatrix4MakeZRotation(_:)](glkit/glkmatrix4makezrotation(_:).md)
- [GLKMatrix4MakeWithQuaternion(_:)](glkit/glkmatrix4makewithquaternion(_:).md)
- [GLKMatrix4MakeScale(_:_:_:)](glkit/glkmatrix4makescale(_:_:_:).md)
- [GLKMatrix4MakeTranslation(_:_:_:)](glkit/glkmatrix4maketranslation(_:_:_:).md)
- [GLKMatrix4MakeLookAt(_:_:_:_:_:_:_:_:_:)](glkit/glkmatrix4makelookat(_:_:_:_:_:_:_:_:_:).md)
- [GLKMatrix4MakeOrtho(_:_:_:_:_:_:)](glkit/glkmatrix4makeortho(_:_:_:_:_:_:).md)
- [GLKMatrix4MakePerspective(_:_:_:_:)](glkit/glkmatrix4makeperspective(_:_:_:_:).md)
