MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / UpdateAverage

Function UpdateAverage

PresentMon/OutputThread.cpp:234–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234static void UpdateAverage(float* avg, double value)
235{
236 float constexpr expAvgScale = 0.0165f; // similar result to 120-present moving average
237
238 if (value == 0.0) {
239 *avg = 0.f;
240 } else if (*avg == 0.f) {
241 *avg = float(value);
242 } else {
243 *avg = (1.f - expAvgScale) * *avg + expAvgScale * float(value);
244 }
245}
246
247static void PruneOldSwapChainData(
248 PMTraceSession const& pmSession,

Callers 1

ProcessEventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected