Dan Connelly points out that it should be "n * (n + 1) / 2" (plus, not minus).

This commit is contained in:
Sean C. Rhea
2008-05-19 14:46:50 +00:00
parent 9d557b26a1
commit ff59009f86

View File

@@ -225,7 +225,7 @@ CpintPlot::calculate(QString fileName, QDateTime dateTime)
RideFileFactory::instance().openRideFile(file, errors);
assert(rideFile);
double x = rideFile->dataPoints().size();
progress_max += x * (x - 1.0) / 2.0;
progress_max += x * (x + 1.0) / 2.0;
delete rideFile;
}
}