# 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)

*** ** * ** ***


```
public abstract class MotionInterpolator implements Interpolator
```

<br />

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

|---|---|
| `https://developer.android.com/reference/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/androidx/constraintlayout/motion/widget/MotionInterpolator#MotionInterpolator()()` |

| ### Public methods |
|---|---|
| `abstract float` | `https://developer.android.com/reference/androidx/constraintlayout/motion/widget/MotionInterpolator#getInterpolation(float)(float v)` Gets the interpolated given the original interpolation |
| `abstract float` | `https://developer.android.com/reference/androidx/constraintlayout/motion/widget/MotionInterpolator#getVelocity()()` Gets the velocity at the last interpolated point |

## Public constructors

### MotionInterpolator

Added in 2.2.2

```
public MotionInterpolator()
```

## Public methods

### getInterpolation

```
public abstract float getInterpolation(float v)
```

Gets the interpolated given the original interpolation

| Parameters |
|---|---|
| `float v` |   |

| Returns |
|---|---|
| `float` |   |

### getVelocity

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

```
public abstract float getVelocity()
```

Gets the velocity at the last interpolated point

| Returns |
|---|---|
| `float` |   |