# InterpolatingAnimator

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/animation/trait-interpolatinganimator/

**trait** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
trait InterpolatingAnimator: 'static
```

The base of user-defined animators: an interpolation function for a
value type.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_custom_animator.rs#L31)

## Members

- [`Value`](#assoc_type-value)
- [`interpolate`](#function-interpolate)

<a id="assoc_type-value"></a>

### Value

```rust
type Value: PropertyValue + Default
```

The type of the values the animator interpolates, which is the value
type of the properties it animates.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_custom_animator.rs#L34)

<a id="function-interpolate"></a>

### interpolate

```rust
fn interpolate(self: &Self, progress: f64, old_value: &<Self as >::Value, new_value: &<Self as >::Value) -> <Self as >::Value
```

Interpolates between two values using the specified progress.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_custom_animator.rs#L37)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
