# ScalarNaturalMotionAnimation

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/animations/struct-scalarnaturalmotionanimation/

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

```rust
struct ScalarNaturalMotionAnimation
```

A natural motion animation of scalar values (WinUI `ScalarNaturalMotionAnimation`): where the motion starts and ends, and its initial velocity.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/natural_motion_animation.rs#L296)

## Members

- [`final_value`](#function-final_value)
- [`set_final_value`](#function-set_final_value)
- [`initial_value`](#function-initial_value)
- [`set_initial_value`](#function-set_initial_value)
- [`initial_velocity`](#function-initial_velocity)
- [`set_initial_velocity`](#function-set_initial_velocity)

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

### final_value

```rust
fn final_value(self: &Self) -> Option<f32>
```

The value the motion comes to rest at. When `None`, an
implicit animation moves to the new value of the property
(`this.FinalValue`), and an explicit one to the current value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/natural_motion_animation.rs#L296)

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

### set_final_value

```rust
fn set_final_value(self: &Self, value: Option<f32>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/natural_motion_animation.rs#L296)

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

### initial_value

```rust
fn initial_value(self: &Self) -> Option<f32>
```

The value the motion starts from; the current value of the
property when `None`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/natural_motion_animation.rs#L296)

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

### set_initial_value

```rust
fn set_initial_value(self: &Self, value: Option<f32>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/natural_motion_animation.rs#L296)

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

### initial_velocity

```rust
fn initial_velocity(self: &Self) -> f32
```

The velocity the motion starts with, in units of the property
per second.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/natural_motion_animation.rs#L296)

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

### set_initial_velocity

```rust
fn set_initial_velocity(self: &Self, value: f32)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/natural_motion_animation.rs#L296)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ErasedDestructor`
- `IntoEither`
- `Deref`

## Availability

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