Turns out std::fixed modificator was not needed and was messing up other floats

sql-rework
Tomasz Golinski 2020-07-13 22:09:11 +02:00
rodzic 9148516ac6
commit 7e95d1fbce
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -530,7 +530,7 @@ int main(int argc, char** argv) {
std::cout << "</table>\n";
std::cout << "<div class=\"basic_stats\">\n";
std::cout << "Average age of cache at the moment of finding: <span class=\"value\">" << std::fixed << average(cc, &Cache::age_when_found) / 365 * 12 << "</span> months<br>\n";
std::cout << "Average age of cache at the moment of finding: <span class=\"value\">" << average(cc, &Cache::age_when_found) / 365 * 12 << "</span> months<br>\n";
std::cout << "Number of caches found within first 24h: <span class=\"value\">" << std::count_if(cc.begin(), cc.end(), [&](auto& a) { return a.age_when_found == 0; }) << "</span><br>\n";
std::cout << "Number of caches found within first 48h: <span class=\"value\">" << std::count_if(cc.begin(), cc.end(), [&](auto& a) { return a.age_when_found <= 1; }) << "</span><br>\n";
std::cout << "Number of caches found during first week: <span class=\"value\">" << std::count_if(cc.begin(), cc.end(), [&](auto& a) { return a.age_when_found < 7; }) << "</span><br>\n";