Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ensureNonNegative (0.08 sec)

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

      public void testEnsureNonNegative() {
        assertThat(DoubleUtils.ensureNonNegative(0.0)).isEqualTo(0.0);
        for (double positiveValue : POSITIVE_FINITE_DOUBLE_CANDIDATES) {
          assertThat(DoubleUtils.ensureNonNegative(positiveValue)).isEqualTo(positiveValue);
          assertThat(DoubleUtils.ensureNonNegative(-positiveValue)).isEqualTo(0.0);
        }
        assertThat(DoubleUtils.ensureNonNegative(Double.POSITIVE_INFINITY)).isPositiveInfinity();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 03 18:10:55 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/DoubleUtilsTest.java

      public void testEnsureNonNegative() {
        assertThat(DoubleUtils.ensureNonNegative(0.0)).isEqualTo(0.0);
        for (double positiveValue : POSITIVE_FINITE_DOUBLE_CANDIDATES) {
          assertThat(DoubleUtils.ensureNonNegative(positiveValue)).isEqualTo(positiveValue);
          assertThat(DoubleUtils.ensureNonNegative(-positiveValue)).isEqualTo(0.0);
        }
        assertThat(DoubleUtils.ensureNonNegative(Double.POSITIVE_INFINITY)).isPositiveInfinity();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 03 18:10:55 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/math/DoubleUtils.java

         */
        bits |= x.signum() & SIGN_MASK;
        return longBitsToDouble(bits);
      }
    
      /** Returns its argument if it is non-negative, zero if it is negative. */
      static double ensureNonNegative(double value) {
        checkArgument(!isNaN(value));
        return max(value, 0.0);
      }
    
      @VisibleForTesting static final long ONE_BITS = 0x3ff0000000000000L;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. guava/src/com/google/common/math/DoubleUtils.java

         */
        bits |= x.signum() & SIGN_MASK;
        return longBitsToDouble(bits);
      }
    
      /** Returns its argument if it is non-negative, zero if it is negative. */
      static double ensureNonNegative(double value) {
        checkArgument(!isNaN(value));
        return max(value, 0.0);
      }
    
      @VisibleForTesting static final long ONE_BITS = 0x3ff0000000000000L;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.1K bytes
    - Viewed (0)
Back to top