Skip to content

Commit

Permalink
Add minor code reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
mahozad committed Mar 15, 2024
1 parent 32b7d6c commit b5d7d39
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ private inline fun DrawScope.createWavyPath(
val waveShiftPx = waveShift.toPx()
val waveLengthPx = waveLength.toPx()
val waveHeightPx = waveHeight.toPx().absoluteValue
val startHeightFactor = if (incremental) 0f else 1f
val startRadians = waveSpread * (waveShiftPx) / waveLengthPx * (2 * PI)
val startHeightFactor = if (incremental) 0f else 1f
val startY = (sin(startRadians) * startHeightFactor * waveHeightPx + size.height) / 2
moveTo(startOffset.x, startY.toFloat())
val range = if (layoutDirection == LayoutDirection.Rtl) {
Expand Down

0 comments on commit b5d7d39

Please sign in to comment.