Skip to content

Commit

Permalink
Fix QgsStatisticalSummary sometimes returning 0 for StDevSample stat
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 19, 2015
1 parent 23dd501 commit 2aa2040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsstatisticalsummary.cpp
Expand Up @@ -67,7 +67,7 @@ void QgsStatisticalSummary::calculate( const QList<double> &values )

mMean = mSum / mCount;

if ( mStatistics & QgsStatisticalSummary::StDev )
if ( mStatistics & QgsStatisticalSummary::StDev || mStatistics & QgsStatisticalSummary::StDevSample )
{
double sumSquared = 0;
Q_FOREACH ( double value, values )
Expand Down

0 comments on commit 2aa2040

Please sign in to comment.