This commit is contained in:
Laurent Perron
2024-01-31 16:34:27 +01:00
parent 964d8556ce
commit 5a704a4d68

View File

@@ -67,7 +67,7 @@ bool AreBoundsFreeOrBoxed(Fractional lower_bound, Fractional upper_bound) {
template <class I, class T>
double Average(const absl::StrongVector<I, T>& v) {
const size_t size = v.size();
DCHECK_LT(0, size);
if (size == 0) return 0.0;
double sum = 0.0;
double n = 0.0; // n is used in a calculation involving doubles.
for (I i(0); i < size; ++i) {