- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for ensureNonNegative (0.3 sec)
-
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) -
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) -
android/guava/src/com/google/common/math/StatsAccumulator.java
* the License. */ package com.google.common.math; import static com.google.common.base.Preconditions.checkState; import static com.google.common.math.DoubleUtils.ensureNonNegative; import static com.google.common.primitives.Doubles.isFinite; import static java.lang.Double.NaN; import static java.lang.Double.isNaN; import com.google.common.annotations.GwtIncompatible;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 23 16:45:30 UTC 2024 - 15.8K bytes - Viewed (0) -
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) -
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) -
guava/src/com/google/common/math/Stats.java
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import static com.google.common.math.DoubleUtils.ensureNonNegative; import static com.google.common.math.StatsAccumulator.calculateNewMeanNonFinite; import static com.google.common.primitives.Doubles.isFinite; import static java.lang.Double.NaN;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 23 16:45:30 UTC 2024 - 24.9K bytes - Viewed (0)