<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Maintained for binary compatibility

<h2 id="rotateby-degrees">rotateBy</h2>

```kotlin
suspend fun TransformableState.rotateBy(degrees: Float) = rotateBy(degrees, Offset.Unspecified)
```

Rotate without animation by a `degrees` degrees and suspend until it's set.

#### Parameters

| | |
| --- | --- |
| degrees | degrees by which to rotate |

<hr class="docs-overload-divider">

<h2 id="rotateby-degrees-centroid">rotateBy</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
suspend fun TransformableState.rotateBy(degrees: Float, centroid: Offset = Offset.Unspecified) =
    transform {
        transformByWithCentroid(
            centroid = centroid,
            zoomChange = 1f,
            panChange = Offset.Zero,
            rotationChange = degrees,
        )
    }
```

Rotate without animation by a `degrees` degrees and suspend until it's set.

#### Parameters

| | |
| --- | --- |
| degrees | degrees by which to rotate |
| centroid | the [Offset](/jetpack-compose/androidx.compose.ui/ui-geometry/functions/Offset) around which the rotation should occur, if any. The default value is `Offset.Unspecified`, which leaves the behavior up to the implementation of the [TransformableState](/jetpack-compose/androidx.compose.foundation/foundation/functions/TransformableState). |