# VectorizedTweenSpec

Artifact: [androidx.compose.animation:animation-core](https://developer.android.com/jetpack/androidx/releases/compose-animation) [View Source](https://cs.android.com/search?q=file:androidx/compose/animation/core/VectorizedAnimationSpec.kt+class:androidx.compose.animation.core.VectorizedTweenSpec) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0) Common/All
- Cmn

  ```
  class VectorizedTweenSpec<V : AnimationVector> : VectorizedDurationBasedAnimationSpec<V>
  ```

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec` animates a `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector` value by interpolating the start and end value, in the given `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec#(kotlin.Int,kotlin.Int,androidx.compose.animation.core.Easing)` using the given `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec#(kotlin.Int,kotlin.Int,androidx.compose.animation.core.Easing)` curve.

## Summary

| ### Public constructors |
|---|---|
| `<V : https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector> https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec#VectorizedTweenSpec(kotlin.Int,kotlin.Int,androidx.compose.animation.core.Easing)( durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, easing: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Easing )` | Cmn |

| ### Public functions |
|---|---|---|
| `open V` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec#getValueFromNanos(kotlin.Long,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector)( playTimeNanos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, initialValue: V, targetValue: V, initialVelocity: V )` Calculates the value of the animation at given the playtime, with the provided start/end values, and start velocity. | Cmn |
| `open V` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec#getVelocityFromNanos(kotlin.Long,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector)( playTimeNanos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, initialValue: V, targetValue: V, initialVelocity: V )` Calculates the velocity of the animation at given the playtime, with the provided start/end values, and start velocity. | Cmn |

| ### Public properties |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec#delayMillis()` the amount of time the animation should wait before it starts running, 0 by default. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec#durationMillis()` duration of the `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec` animation. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Easing` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec#easing()` the easing curve used by the animation. | Cmn |

### Inherited functions

From [androidx.compose.animation.core.VectorizedAnimationSpec](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec) `open V` `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec#getEndVelocity(androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector)(initialValue: V, targetValue: V, initialVelocity: V)`

Calculates the end velocity of the animation with the provided start/end values, and start velocity.
Cmn From [androidx.compose.animation.core.VectorizedDurationBasedAnimationSpec](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedDurationBasedAnimationSpec) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedDurationBasedAnimationSpec#getDurationNanos(androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector)(initialValue: V, targetValue: V, initialVelocity: V)`

Calculates the duration of an animation.
Cmn

### Inherited properties

From [androidx.compose.animation.core.VectorizedFiniteAnimationSpec](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedFiniteAnimationSpec) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedFiniteAnimationSpec#isInfinite()`

Whether or not the `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec` specifies an infinite animation.
Cmn

## Public constructors

### VectorizedTweenSpec

Cmn

```
<V : AnimationVector> VectorizedTweenSpec(
    durationMillis: Int = DefaultDurationMillis,
    delayMillis: Int = 0,
    easing: Easing = FastOutSlowInEasing
)
```

| Parameters |
|---|---|
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = DefaultDurationMillis` | duration of the `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec` animation. Defaults to `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationConstants#DefaultDurationMillis()`. |
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 0` | the amount of time the animation should wait before it starts running, 0 by default. |
| `easing: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Easing = FastOutSlowInEasing` | the easing curve used by the animation. `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#FastOutSlowInEasing()` by default. |

## Public functions

### getValueFromNanos

Cmn

```
open fun getValueFromNanos(
    playTimeNanos: Long,
    initialValue: V,
    targetValue: V,
    initialVelocity: V
): V
```

Calculates the value of the animation at given the playtime, with the provided start/end values, and start velocity.

| Parameters |
|---|---|
| `playTimeNanos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | time since the start of the animation |
| `initialValue: V` | start value of the animation |
| `targetValue: V` | end value of the animation |
| `initialVelocity: V` | start velocity of the animation |

### getVelocityFromNanos

Cmn

```
open fun getVelocityFromNanos(
    playTimeNanos: Long,
    initialValue: V,
    targetValue: V,
    initialVelocity: V
): V
```

Calculates the velocity of the animation at given the playtime, with the provided start/end values, and start velocity.

| Parameters |
|---|---|
| `playTimeNanos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | time since the start of the animation |
| `initialValue: V` | start value of the animation |
| `targetValue: V` | end value of the animation |
| `initialVelocity: V` | start velocity of the animation |

## Public properties

### delayMillis

Cmn

```
open val delayMillis: Int
```

the amount of time the animation should wait before it starts running, 0 by default.

### durationMillis

Cmn

```
open val durationMillis: Int
```

duration of the `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedTweenSpec` animation. Defaults to `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationConstants#DefaultDurationMillis()`.

### easing

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)

```
val easing: Easing
```

the easing curve used by the animation. `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#FastOutSlowInEasing()` by default.