From c7fe09903c7d8bca96f72d4751f4d31523ef45ff Mon Sep 17 00:00:00 2001 From: cmdgears Date: Wed, 20 Oct 2021 17:48:39 +0200 Subject: [PATCH] Update 'Statistic.cpp' --- Statistic.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Statistic.cpp b/Statistic.cpp index d188040..accf8be 100644 --- a/Statistic.cpp +++ b/Statistic.cpp @@ -66,7 +66,7 @@ Statistic::Statistic(bool useStdDev) } -void Statistic::clear(bool useStdDev) // useStdDev default true. +void Statistic::clear(bool useStdDev) volatile // useStdDev default true. { _cnt = 0; _sum = 0; @@ -80,7 +80,7 @@ void Statistic::clear(bool useStdDev) // useStdDev default true. // adds a new value to the data-set -float Statistic::add(const float value) +float Statistic::add(const float value) volatile { float previousSum = _sum; if (_cnt == 0) @@ -118,7 +118,7 @@ float Statistic::average() const } -// Population standard deviation = s = sqrt [ S ( Xi - µ )2 / N ] +// Population standard deviation = s = sqrt [ S ( Xi - µ )2 / N ] // http://www.suite101.com/content/how-is-standard-deviation-used-a99084 float Statistic::variance() const {