File tree Expand file tree Collapse file tree
reorderable/src/commonMain/kotlin/org/burnoutcrew/reorderable Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments