- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ensureNonNegative (0.13 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 3K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 5.1K 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 java.lang.Double.NaN; import static java.lang.Double.isFinite; import static java.lang.Double.isNaN; import com.google.common.annotations.GwtIncompatible;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Apr 14 16:36:11 UTC 2025 - 15.8K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 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 java.lang.Double.NaN; import static java.lang.Double.doubleToLongBits; import static java.lang.Double.isFinite;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Jul 08 18:32:10 UTC 2025 - 24.8K bytes - Viewed (0)