Skip to content

Commit

Permalink
Remove an unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
mahozad committed Mar 15, 2024
1 parent d62d932 commit 4932203
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,6 @@ private inline fun DrawScope.createWavyPath(
}
}

internal inline fun snapValueToTick(
current: Float,
tickFractions: FloatArray,
minPx: Float,
maxPx: Float
): Float {
// target is a closest anchor to the `current`, if exists
return tickFractions
.minByOrNull { abs(lerp(minPx, maxPx, it) - current) }
?.run { lerp(minPx, maxPx, this) }
?: current
}

// Scale x1 from a1..b1 range to a2..b2 range
internal inline fun scale(a1: Float, b1: Float, x1: Float, a2: Float, b2: Float) =
lerp(a2, b2, calcFraction(a1, b1, x1))
Expand Down

0 comments on commit 4932203

Please sign in to comment.