🌈 Create new beautiful Compose Gradients with our new wesite ->
Property

EaseInOutElastic

!EaseInOutElastic Curve

Source set: Common
public val EaseInOutElastic: Easing = Easing { fraction ->
    val c5 = (2f * PI) / 4.5f
    return@Easing when (fraction) {
        0f -> 0f
        1f -> 1f
        in 0f..0.5f ->
            (-(2.0f.pow(20.0f * fraction - 10.0f) * sin((20.0f * fraction - 11.125f) * c5)) / 2.0f)
                .toFloat()
        else ->
            ((2.0f.pow(-20.0f * fraction + 10.0f) * sin((fraction * 20f - 11.125f) * c5)) / 2f)
                .toFloat() + 1f
    }
}

EaseInOutElastic Curve