# MotionInterpolator

Artifact: [androidx.constraintlayout:constraintlayout](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/motion/widget/MotionInterpolator.java+class:androidx.constraintlayout.motion.widget.MotionInterpolator) Added in [2.2.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#2.2.2)

*** ** * ** ***


```
abstract class MotionInterpolator : Interpolator
```

<br />

Known direct subclasses [StopLogic](https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/utils/StopLogic)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/utils/StopLogic` | This contains the class to provide the logic for an animation to come to a stop. |

*** ** * ** ***

Defines an interpolator that can return velocity

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionInterpolator#MotionInterpolator()()` |

| ### Public functions |
|---|---|
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionInterpolator#getInterpolation(float)(v: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Gets the interpolated given the original interpolation |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionInterpolator#getVelocity()()` Gets the velocity at the last interpolated point |

## Public constructors

### MotionInterpolator

Added in 2.2.2

```
MotionInterpolator()
```

## Public functions

### getInterpolation

```
abstract fun getInterpolation(v: Float): Float
```

Gets the interpolated given the original interpolation

| Parameters |
|---|---|
| `v: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` |   |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` |   |

### getVelocity

Added in [2.2.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#2.2.2)

```
abstract fun getVelocity(): Float
```

Gets the velocity at the last interpolated point

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` |   |