- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for checkRoundingUnnecessary (0.08 seconds)
-
guava/src/com/google/common/math/ToDoubleRounder.java
* the License. */ package com.google.common.math; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.math.MathPreconditions.checkRoundingUnnecessary; import com.google.common.annotations.GwtIncompatible; import java.math.RoundingMode; /** * Helper type to implement rounding {@code X} to a representable {@code double} value according toCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sat Dec 21 03:10:51 GMT 2024 - 5.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/math/MathPreconditionsTest.java
} public void testCheckRoundingUnnecessary_success() { MathPreconditions.checkRoundingUnnecessary(true); } public void testCheckRoundingUnnecessary_failure() { assertThrows( ArithmeticException.class, () -> MathPreconditions.checkRoundingUnnecessary(false)); } public void testCheckInRange_success() {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 19 18:03:30 GMT 2024 - 8K bytes - Click Count (0) -
android/guava/src/com/google/common/math/MathPreconditions.java
if (!(x >= 0)) { // not x < 0, to work with NaN. throw new IllegalArgumentException(role + " (" + x + ") must be >= 0"); } return x; } static void checkRoundingUnnecessary(boolean condition) { if (!condition) { throw new ArithmeticException("mode was UNNECESSARY, but rounding was necessary"); } }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sat Dec 21 03:10:51 GMT 2024 - 3.2K bytes - Click Count (0)