mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-15 18:37:17 +01:00
28 lines
1.1 KiB
Java
28 lines
1.1 KiB
Java
package androidx.compose.ui.geometry;
|
|
|
|
import kotlin.Metadata;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\u0012\n\u0000\n\u0002\u0010\u000e\n\u0002\u0010\u0007\n\u0000\n\u0002\u0010\b\n\u0000\u001a\u0014\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0004H\u0000¨\u0006\u0005"}, d2 = {"toStringAsFixed", "", "", "digits", "", "ui-geometry"}, k = 2, mv = {2, 0, 0}, xi = 48)
|
|
/* loaded from: classes13.dex */
|
|
public final class GeometryUtilsKt {
|
|
@NotNull
|
|
public static final String toStringAsFixed(float f, int i) {
|
|
if (Float.isNaN(f)) {
|
|
return "NaN";
|
|
}
|
|
if (Float.isInfinite(f)) {
|
|
return f < 0.0f ? "-Infinity" : "Infinity";
|
|
}
|
|
int max = Math.max(i, 0);
|
|
float pow = (float) Math.pow(10.0f, max);
|
|
float f2 = f * pow;
|
|
int i2 = (int) f2;
|
|
if (f2 - i2 >= 0.5f) {
|
|
i2++;
|
|
}
|
|
float f3 = i2 / pow;
|
|
return max > 0 ? String.valueOf(f3) : String.valueOf((int) f3);
|
|
}
|
|
}
|