---
title: "rotate(byDegrees:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsaffinetransform/rotate(bydegrees:)"
---

# rotate(byDegrees:)

Applies a rotation factor (measured in degrees) to the receiver’s transformation matrix.

## Declaration

```swift
func rotate(byDegrees angle: Double)
```

## Parameters

- `angle`: The rotation angle, measured in degrees.

## Discussion

Discussion After invoking this method, applying the receiver’s matrix turns the axes counterclockwise about the current origin by angle degrees, in addition to performing all previous transformations.

## See Also

### Accumulating Transformations

- [rotate(byRadians:)](foundation/nsaffinetransform/rotate(byradians:).md)
- [scale(by:)](foundation/nsaffinetransform/scale(by:).md)
- [scaleX(by:yBy:)](foundation/nsaffinetransform/scalex(by:yby:).md)
- [translateX(by:yBy:)](foundation/nsaffinetransform/translatex(by:yby:).md)
- [append(_:)](foundation/nsaffinetransform/append(_:).md)
- [prepend(_:)](foundation/nsaffinetransform/prepend(_:).md)
- [invert()](foundation/nsaffinetransform/invert().md)
