Skip to content

Commit 6bbfc86

Browse files
klueverGoogle Java Core Libraries
authored andcommitted
Add BigDecimal.TWO in J2CL & GWT.
RELNOTES=n/a PiperOrigin-RevId: 755810613
1 parent f4fb824 commit 6bbfc86

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

android/guava-tests/test/com/google/common/math/IntMathTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ private static void assertMean(int x, int y) {
657657
private static int computeMeanSafely(int x, int y) {
658658
BigInteger bigX = BigInteger.valueOf(x);
659659
BigInteger bigY = BigInteger.valueOf(y);
660-
BigDecimal two = BigDecimal.valueOf(2); // .TWO constant is absent in j2cl
660+
BigDecimal two = BigDecimal.valueOf(2); // Android doesn't have BigDecimal.TWO yet
661661
BigDecimal bigMean = new BigDecimal(bigX.add(bigY)).divide(two, RoundingMode.FLOOR);
662662
return bigMean.intValueExact();
663663
}

android/guava-tests/test/com/google/common/math/LongMathTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ private static void assertMean(long x, long y) {
768768
private static long computeMeanSafely(long x, long y) {
769769
BigInteger bigX = BigInteger.valueOf(x);
770770
BigInteger bigY = BigInteger.valueOf(y);
771-
BigDecimal two = BigDecimal.valueOf(2); // .TWO constant is absent in j2cl
771+
BigDecimal two = BigDecimal.valueOf(2); // Android doesn't have BigDecimal.TWO yet
772772
BigDecimal bigMean = new BigDecimal(bigX.add(bigY)).divide(two, RoundingMode.FLOOR);
773773
return bigMean.longValueExact();
774774
}

guava-tests/test/com/google/common/math/IntMathTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ private static void assertMean(int x, int y) {
657657
private static int computeMeanSafely(int x, int y) {
658658
BigInteger bigX = BigInteger.valueOf(x);
659659
BigInteger bigY = BigInteger.valueOf(y);
660-
BigDecimal two = BigDecimal.valueOf(2); // .TWO constant is absent in j2cl
660+
BigDecimal two = BigDecimal.valueOf(2); // Android doesn't have BigDecimal.TWO yet
661661
BigDecimal bigMean = new BigDecimal(bigX.add(bigY)).divide(two, RoundingMode.FLOOR);
662662
return bigMean.intValueExact();
663663
}

guava-tests/test/com/google/common/math/LongMathTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ private static void assertMean(long x, long y) {
768768
private static long computeMeanSafely(long x, long y) {
769769
BigInteger bigX = BigInteger.valueOf(x);
770770
BigInteger bigY = BigInteger.valueOf(y);
771-
BigDecimal two = BigDecimal.valueOf(2); // .TWO constant is absent in j2cl
771+
BigDecimal two = BigDecimal.valueOf(2); // Android doesn't have BigDecimal.TWO yet
772772
BigDecimal bigMean = new BigDecimal(bigX.add(bigY)).divide(two, RoundingMode.FLOOR);
773773
return bigMean.longValueExact();
774774
}

0 commit comments

Comments
 (0)