File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/utils Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ import androidx.compose.ui.unit.dp
2727import androidx.compose.ui.util.fastCoerceAtMost
2828import androidx.compose.ui.util.fastCoerceIn
2929import kotlin.math.PI
30- import kotlin.math.asin
3130import kotlin.math.cos
3231import kotlin.math.min
3332import kotlin.math.sin
@@ -275,9 +274,9 @@ data class CornerSmoothness(
275274
276275 private val sin = sin(bezierRadians)
277276 private val cos = cos(bezierRadians)
278- private val a = 1f - sin / (1f + cos) // 2/3 at arcsin(0.6)
277+ private val a = 1f - sin / (1f + cos)
279278 private val d = 1.5f * sin / (1f + cos) / (1f + cos)
280- private val ad = a + d // minimum 17/18 at arcsin(0.6)
279+ private val ad = a + d
281280
282281 private fun Path.topRightCorner0 (size : Size , r : Float , dy : Float ) {
283282 val w = size.width
@@ -593,9 +592,8 @@ data class CornerSmoothness(
593592 @Stable
594593 val Default : CornerSmoothness =
595594 CornerSmoothness (
596- // ~= 16.26 deg, bezierRadians = arcsin(0.6)
597- circleFraction = 1f - 2f * asin(0.6f ) / HalfPI ,
598- extendedFraction = 0.75f
595+ circleFraction = 0.2f ,
596+ extendedFraction = 1f
599597 )
600598
601599 @Stable
You can’t perform that action at this time.
0 commit comments