---
title: "animateRotateBy"
description: "Animate rotate by a ratio of [degrees] clockwise and suspend until its finished."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Maintained for binary compatibility

```kotlin
suspend fun TransformableState.animateRotateBy(
    degrees: Float,
    animationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow),
) = animateRotateBy(degrees = degrees, animationSpec = animationSpec, centroid = Offset.Unspecified)
```


Animate rotate by a ratio of `degrees` clockwise and suspend until its finished.

#### Parameters

| | |
| --- | --- |
| degrees | the degrees by which to rotate clockwise |
| animationSpec | `AnimationSpec` to be used for animation |




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


```kotlin
suspend fun TransformableState.animateRotateBy(
    degrees: Float,
    animationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow),
    centroid: Offset = Offset.Unspecified,
)
```


Animate rotate by a ratio of `degrees` clockwise and suspend until its finished.

#### Parameters

| | |
| --- | --- |
| degrees | the degrees by which to rotate clockwise |
| animationSpec | `AnimationSpec` to be used for animation |
| centroid | the `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`. |




