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

Method ensureNonNegative

output/java_guava/1.4.16/DoubleUtils.java:143–150  ·  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

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

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