Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for checkRoundingUnnecessary (0.12 seconds)

  1. 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 Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Dec 21 03:10:51 GMT 2024
    - 3.2K bytes
    - Click Count (0)
  2. android/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 static java.lang.Math.nextDown;
    import static java.lang.Math.nextUp;
    
    import com.google.common.annotations.GwtIncompatible;
    import java.math.RoundingMode;
    
    /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 04:51:56 GMT 2026
    - 5.7K bytes
    - Click Count (0)
  3. 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 Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 05:21:26 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  4. 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 Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 05:21:26 GMT 2026
    - 8.1K bytes
    - Click Count (0)
Back to Top