Skip to content

Commit 5cdfd71

Browse files
fix: rename EaseOutQuadInterpolator to EaseOutQuartInterpolator
1 parent e1c7af4 commit 5cdfd71

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

reorderable/src/commonMain/kotlin/org/burnoutcrew/reorderable/ReorderableState.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ abstract class ReorderableState<T>(
318318

319319
companion object {
320320
private const val ACCELERATION_LIMIT_TIME_MS: Long = 1500
321-
private val EaseOutQuadInterpolator: (Float) -> (Float) = {
321+
private val EaseOutQuartInterpolator: (Float) -> (Float) = {
322322
val t = 1 - it
323323
1 - t * t * t * t
324324
}
@@ -334,7 +334,7 @@ abstract class ReorderableState<T>(
334334
): Float {
335335
if (viewSizeOutOfBounds == 0f) return 0f
336336
val outOfBoundsRatio = min(1f, 1f * viewSizeOutOfBounds.absoluteValue / viewSize)
337-
val cappedScroll = sign(viewSizeOutOfBounds) * maxScroll * EaseOutQuadInterpolator(outOfBoundsRatio)
337+
val cappedScroll = sign(viewSizeOutOfBounds) * maxScroll * EaseOutQuartInterpolator(outOfBoundsRatio)
338338
val timeRatio = if (time > ACCELERATION_LIMIT_TIME_MS) 1f else time.toFloat() / ACCELERATION_LIMIT_TIME_MS
339339
return (cappedScroll * EaseInQuintInterpolator(timeRatio)).let {
340340
if (it == 0f) {

0 commit comments

Comments
 (0)