Returns its argument if it is non-negative, zero if it is negative.
(double value)
| 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 | } |
no test coverage detected