123 |
* @param n - amount of sample values applied so far |
* @param n - amount of sample values applied so far |
124 |
* @returns new average value of all summed values (including the new @a sample) |
* @returns new average value of all summed values (including the new @a sample) |
125 |
*/ |
*/ |
126 |
inline static float RelativeSummedAvg(float current, float sample, int n) { |
template<typename T_int> |
127 |
|
inline static float RelativeSummedAvg(float current, float sample, T_int n) { |
128 |
return current + (sample - current) / float(n); |
return current + (sample - current) / float(n); |
129 |
} |
} |
130 |
|
|