# PointFEvaluator

Artifact: [androidx.core:core-animation](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/PointFEvaluator.java+class:androidx.core.animation.PointFEvaluator) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***


```
class PointFEvaluator : TypeEvaluator<PointF!>
```

<br />

*** ** * ** ***

This evaluator can be used to perform type interpolation between `PointF` values.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/PointFEvaluator#PointFEvaluator()()` Construct a PointFEvaluator that returns a new PointF on every evaluate call. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/PointFEvaluator#PointFEvaluator(android.graphics.PointF)(reuse: https://developer.android.com/reference/android/graphics/PointF.html)` Constructs a PointFEvaluator that modifies and returns `reuse` in `https://developer.android.com/reference/kotlin/androidx/core/animation/PointFEvaluator#evaluate(float,android.graphics.PointF,android.graphics.PointF)` calls. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/PointFEvaluator#evaluate(float,android.graphics.PointF,android.graphics.PointF)(fraction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, startValue: https://developer.android.com/reference/android/graphics/PointF.html, endValue: https://developer.android.com/reference/android/graphics/PointF.html)` This function returns the result of linearly interpolating the start and end PointF values, with `fraction` representing the proportion between the start and end values. |

## Public constructors

### PointFEvaluator

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

```
PointFEvaluator()
```

Construct a PointFEvaluator that returns a new PointF on every evaluate call. To avoid creating an object for each evaluate call, `https://developer.android.com/reference/kotlin/androidx/core/animation/PointFEvaluator#PointFEvaluator(android.graphics.PointF)` should be used whenever possible.

### PointFEvaluator

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

```
PointFEvaluator(reuse: PointF)
```

Constructs a PointFEvaluator that modifies and returns `reuse` in `https://developer.android.com/reference/kotlin/androidx/core/animation/PointFEvaluator#evaluate(float,android.graphics.PointF,android.graphics.PointF)` calls. The value returned from `https://developer.android.com/reference/kotlin/androidx/core/animation/PointFEvaluator#evaluate(float,android.graphics.PointF,android.graphics.PointF)` should not be cached because it will change over time as the object is reused on each call.

| Parameters |
|---|---|
| `reuse: https://developer.android.com/reference/android/graphics/PointF.html` | A PointF to be modified and returned by evaluate. |

## Public functions

### evaluate

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

```
fun evaluate(fraction: Float, startValue: PointF, endValue: PointF): PointF
```

This function returns the result of linearly interpolating the start and end PointF values, with `fraction` representing the proportion between the start and end values. The calculation is a simple parametric calculation on each of the separate components in the PointF objects (x, y).

If `https://developer.android.com/reference/kotlin/androidx/core/animation/PointFEvaluator#PointFEvaluator(android.graphics.PointF)` was used to construct this PointFEvaluator, the object returned will be the `reuse` passed into the constructor.

| Parameters |
|---|---|
| `fraction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The fraction from the starting to the ending values |
| `startValue: https://developer.android.com/reference/android/graphics/PointF.html` | The start PointF |
| `endValue: https://developer.android.com/reference/android/graphics/PointF.html` | The end PointF |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/graphics/PointF.html` | A linear interpolation between the start and end values, given the `fraction` parameter. |