diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2019-06-13 12:53:05 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2019-06-13 12:53:05 -0700 |
| commit | 97975402120d565dd211f9d470e7b192641712c5 (patch) | |
| tree | 9f7a2db5ea4c9568d6b801d52b1fffd857565767 /node/RingBuffer.hpp | |
| parent | ce2338c24a46558a2e0fdb7ebbcf2e6ce9c8b615 (diff) | |
| parent | 3b188ba672559ff80264a8fab32699ebdbf928fe (diff) | |
| download | infinitytier-97975402120d565dd211f9d470e7b192641712c5.tar.gz infinitytier-97975402120d565dd211f9d470e7b192641712c5.zip | |
merge
Diffstat (limited to 'node/RingBuffer.hpp')
| -rw-r--r-- | node/RingBuffer.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/node/RingBuffer.hpp b/node/RingBuffer.hpp index 8b11e9b1..0f29a89a 100644 --- a/node/RingBuffer.hpp +++ b/node/RingBuffer.hpp @@ -268,7 +268,7 @@ public: for (size_t i=0; i<curr_cnt; i++) { iterator = (iterator + S - 1) % curr_cnt; float deviation = (buf[i] - cached_mean); - sum_of_squared_deviations += (deviation*deviation); + sum_of_squared_deviations += (T)(deviation*deviation); } float variance = (float)sum_of_squared_deviations / (float)(S - 1); return variance; |
