Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for ToDoubleRounder (0.1 sec)

  1. guava/src/com/google/common/math/ToDoubleRounder.java

    /**
     * Helper type to implement rounding {@code X} to a representable {@code double} value according to
     * a {@link RoundingMode}.
     */
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    abstract class ToDoubleRounder<X extends Number & Comparable<X>> {
      /**
       * Returns x rounded to either the greatest double less than or equal to the precise value of x,
       * or the least double greater than or equal to the precise value of x.
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/ToDoubleRounder.java

    /**
     * Helper type to implement rounding {@code X} to a representable {@code double} value according to
     * a {@link RoundingMode}.
     */
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    abstract class ToDoubleRounder<X extends Number & Comparable<X>> {
      /**
       * Returns x rounded to either the greatest double less than or equal to the precise value of x,
       * or the least double greater than or equal to the precise value of x.
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/math/BigDecimalMath.java

       */
      public static double roundToDouble(BigDecimal x, RoundingMode mode) {
        return BigDecimalToDoubleRounder.INSTANCE.roundToDouble(x, mode);
      }
    
      private static class BigDecimalToDoubleRounder extends ToDoubleRounder<BigDecimal> {
        static final BigDecimalToDoubleRounder INSTANCE = new BigDecimalToDoubleRounder();
    
        private BigDecimalToDoubleRounder() {}
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/math/BigDecimalMath.java

       */
      public static double roundToDouble(BigDecimal x, RoundingMode mode) {
        return BigDecimalToDoubleRounder.INSTANCE.roundToDouble(x, mode);
      }
    
      private static class BigDecimalToDoubleRounder extends ToDoubleRounder<BigDecimal> {
        static final BigDecimalToDoubleRounder INSTANCE = new BigDecimalToDoubleRounder();
    
        private BigDecimalToDoubleRounder() {}
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/math/BigIntegerMath.java

        return BigIntegerToDoubleRounder.INSTANCE.roundToDouble(x, mode);
      }
    
      @GwtIncompatible
      private static class BigIntegerToDoubleRounder extends ToDoubleRounder<BigInteger> {
        static final BigIntegerToDoubleRounder INSTANCE = new BigIntegerToDoubleRounder();
    
        private BigIntegerToDoubleRounder() {}
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  6. guava/src/com/google/common/math/LongMath.java

       * @since 30.0
       */
      @SuppressWarnings("deprecation")
      @GwtIncompatible
      public static double roundToDouble(long x, RoundingMode mode) {
        // Logic adapted from ToDoubleRounder.
        double roundArbitrarily = (double) x;
        long roundArbitrarilyAsLong = (long) roundArbitrarily;
        int cmpXToRoundArbitrarily;
    
        if (roundArbitrarilyAsLong == Long.MAX_VALUE) {
          /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/math/LongMath.java

       * @since 30.0
       */
      @SuppressWarnings("deprecation")
      @GwtIncompatible
      public static double roundToDouble(long x, RoundingMode mode) {
        // Logic adapted from ToDoubleRounder.
        double roundArbitrarily = (double) x;
        long roundArbitrarilyAsLong = (long) roundArbitrarily;
        int cmpXToRoundArbitrarily;
    
        if (roundArbitrarilyAsLong == Long.MAX_VALUE) {
          /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top