AHRSInterface.calcVar.getStandardDeviation C# (CSharp) Method

getStandardDeviation() private method

private getStandardDeviation ( List doubleList ) : double
doubleList List
return double
        private double getStandardDeviation(List<double> doubleList)
        {
            double average = doubleList.Average();
            double sumOfDerivation = 0;
            foreach (double value in doubleList)
            {
                sumOfDerivation += (value) * (value);
            }
            double sumOfDerivationAverage = sumOfDerivation / (doubleList.Count - 1);
            return Math.Sqrt(sumOfDerivationAverage - (average * average));
        }