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

# GLKMatrix3RotateWithVector4(_:_:_:)

Returns a new 3x3 matrix created by concatenating a matrix with a rotation around a vector.

## Declaration

```swift
func GLKMatrix3RotateWithVector4(_ matrix: GLKMatrix3, _ radians: Float, _ axisVector: GLKVector4) -> GLKMatrix3
```

## Parameters

- `matrix`: The source matrix.
- `radians`: The angle of the rotation (a positive angle is counterclockwise).
- `axisVector`: The axis to perform the rotation around.

## Return Value

Return Value A new matrix.

## Discussion

Discussion The w-component of the axisVector parameter is ignored.

## See Also

### Performing Mathematical Operations on Matrices

- [GLKMatrix3Invert(_:_:)](glkit/glkmatrix3invert(_:_:).md)
- [GLKMatrix3Transpose(_:)](glkit/glkmatrix3transpose(_:).md)
- [GLKMatrix3InvertAndTranspose(_:_:)](glkit/glkmatrix3invertandtranspose(_:_:).md)
- [GLKMatrix3Multiply(_:_:)](glkit/glkmatrix3multiply(_:_:).md)
- [GLKMatrix3Rotate(_:_:_:_:_:)](glkit/glkmatrix3rotate(_:_:_:_:_:).md)
- [GLKMatrix3RotateWithVector3(_:_:_:)](glkit/glkmatrix3rotatewithvector3(_:_:_:).md)
- [GLKMatrix3RotateX(_:_:)](glkit/glkmatrix3rotatex(_:_:).md)
- [GLKMatrix3RotateY(_:_:)](glkit/glkmatrix3rotatey(_:_:).md)
- [GLKMatrix3RotateZ(_:_:)](glkit/glkmatrix3rotatez(_:_:).md)
- [GLKMatrix3Scale(_:_:_:_:)](glkit/glkmatrix3scale(_:_:_:_:).md)
- [GLKMatrix3ScaleWithVector3(_:_:)](glkit/glkmatrix3scalewithvector3(_:_:).md)
- [GLKMatrix3ScaleWithVector4(_:_:)](glkit/glkmatrix3scalewithvector4(_:_:).md)
- [GLKMatrix3Add(_:_:)](glkit/glkmatrix3add(_:_:).md)
- [GLKMatrix3Subtract(_:_:)](glkit/glkmatrix3subtract(_:_:).md)
