alexandroid/decompiled/jadx/sources/com/google/common/math/BigDecimalMath.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

47 lines
1.7 KiB
Java

package com.google.common.math;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import java.math.BigDecimal;
import java.math.RoundingMode;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@J2ktIncompatible
@GwtIncompatible
/* loaded from: classes8.dex */
public class BigDecimalMath {
private BigDecimalMath() {
}
public static double roundToDouble(BigDecimal bigDecimal, RoundingMode roundingMode) {
return BigDecimalToDoubleRounder.INSTANCE.roundToDouble(bigDecimal, roundingMode);
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class BigDecimalToDoubleRounder extends ToDoubleRounder<BigDecimal> {
static final BigDecimalToDoubleRounder INSTANCE = new BigDecimalToDoubleRounder();
private BigDecimalToDoubleRounder() {
}
@Override // com.google.common.math.ToDoubleRounder
public BigDecimal toX(double d, RoundingMode roundingMode) {
return new BigDecimal(d);
}
@Override // com.google.common.math.ToDoubleRounder
public double roundToDoubleArbitrarily(BigDecimal bigDecimal) {
return bigDecimal.doubleValue();
}
@Override // com.google.common.math.ToDoubleRounder
public int sign(BigDecimal bigDecimal) {
return bigDecimal.signum();
}
@Override // com.google.common.math.ToDoubleRounder
public BigDecimal minus(BigDecimal bigDecimal, BigDecimal bigDecimal2) {
return bigDecimal.subtract(bigDecimal2);
}
}
}