Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for checkRoundingUnnecessary (1.88 sec)

  1. 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 com.google.common.annotations.GwtIncompatible;
    import java.math.RoundingMode;
    
    /**
     * Helper type to implement rounding {@code X} to a representable {@code double} value according to
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/MathPreconditionsTest.java

        }
      }
    
      public void testCheckRoundingUnnecessary_success() {
        MathPreconditions.checkRoundingUnnecessary(true);
      }
    
      public void testCheckRoundingUnnecessary_failure() {
        try {
          MathPreconditions.checkRoundingUnnecessary(false);
          fail();
        } catch (ArithmeticException expected) {
        }
      }
    
      public void testCheckInRange_success() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/MathPreconditionsTest.java

        }
      }
    
      public void testCheckRoundingUnnecessary_success() {
        MathPreconditions.checkRoundingUnnecessary(true);
      }
    
      public void testCheckRoundingUnnecessary_failure() {
        try {
          MathPreconditions.checkRoundingUnnecessary(false);
          fail();
        } catch (ArithmeticException expected) {
        }
      }
    
      public void testCheckInRange_success() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  4. 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");
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 3.3K bytes
    - Viewed (0)
Back to top