calculateTargetValue

Function

Common
public fun <T, V : AnimationVector> DecayAnimationSpec<T>.calculateTargetValue(
    typeConverter: TwoWayConverter<T, V>,
    initialValue: T,
    initialVelocity: T,
): T

Calculates the target value of a decay animation based on the initialValue and initialVelocity, and the typeConverter that converts the given type T to AnimationVector.

Returns

target value where the animation will come to a natural stop
Common
public fun DecayAnimationSpec<Float>.calculateTargetValue(
    initialValue: Float,
    initialVelocity: Float,
): Float

Calculates the target value of a Float decay animation based on the initialValue and initialVelocity.

Returns

target value where the animation will come to a natural stop