Utils: Fix NAN error fix (last commit)
[senf.git] / senf / Utils / Statistics.cc
index 445e1c4..079bb3c 100644 (file)
@@ -272,7 +272,7 @@ prefix_ void senf::Collector::enter(float min, float avg, float max, float dev)
     if (max > accMax_) accMax_ = max;
     if (++i_ >= rank_) {
         float accAvg (accSum_ / i_);
-        float accDev (std::max(0.0f,std::sqrt(accSumSq_ / i_ - accAvg*accAvg)));
+        float accDev (std::sqrt(std::max(0.0f,accSumSq_ / i_ - accAvg*accAvg)));
         StatisticsBase::enter(accMin_, accAvg, accMax_, accDev);
         i_ = 0;
         accMin_ = FLT_MAX;