MCPcopy Create free account
hub / github.com/antlr/codebuff / ensureNonNegative

Method ensureNonNegative

output/java_guava/1.4.19/DoubleUtils.java:144–151  ·  view source on GitHub ↗

Returns its argument if it is non-negative, zero if it is negative.

(double value)

Source from the content-addressed store, hash-verified

142
143
144 static double ensureNonNegative(double value) {
145 checkArgument(!isNaN(value));
146 if (value > 0.0) {
147 return value;
148 } else {
149 return 0.0;
150 }
151 }
152
153 private static final long ONE_BITS = doubleToRawLongBits(1.0);
154}

Callers 4

populationVarianceMethod · 0.45
sampleVarianceMethod · 0.45
populationVarianceMethod · 0.45
sampleVarianceMethod · 0.45

Calls 1

checkArgumentMethod · 0.45

Tested by

no test coverage detected