kopia lustrzana https://gitlab.com/tomaszg/geostat
Fix a trivial bug with fixed point average calculation introduced by careless copying a few commits below
rodzic
3d33de5a23
commit
9148516ac6
|
@ -251,5 +251,5 @@ float average(const Caches& cc, float Cache::*ptr) {
|
|||
}
|
||||
|
||||
float average(const Caches& cc, int Cache::*ptr) {
|
||||
return std::accumulate(cc.begin(), cc.end(), 0, [&](const float& a, const Cache& b) { return std::move(a) + b.*ptr; }) / cc.size();
|
||||
return 1.0 * std::accumulate(cc.begin(), cc.end(), 0, [&](const float& a, const Cache& b) { return std::move(a) + b.*ptr; }) / cc.size();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue