![]() |
Fling Engine
0.00.1
Fling Engine is a game engine written in Vulkan
|
A moving average can be used to calculate things like FPS. More...
#include <MovingAverage.hpp>
Public Member Functions | |
| MovingAverage () | |
| ~MovingAverage ()=default | |
| void | Push (T t_Element) |
| Push a value onto the buffer to be calculated. More... | |
| T | GetAverage () const |
| Get the average (Sum / num elements) More... | |
Private Attributes | |
| size_t | m_CurrentIndex = {} |
| Index for keeping track of what part of the buffer we should be inserting into. More... | |
| size_t | m_Count = {} |
| Current count of things pushed to this average. More... | |
| size_t | m_MaxSize = {} |
| Max sample size in this moving average. More... | |
| T | m_Buffer [t_Size] = {} |
| Buffer of samples used to calculate the moving average. More... | |
A moving average can be used to calculate things like FPS.
|
inline |
|
default |
|
inline |
Get the average (Sum / num elements)
|
inline |
Push a value onto the buffer to be calculated.
|
private |
Buffer of samples used to calculate the moving average.
|
private |
Current count of things pushed to this average.
|
private |
Index for keeping track of what part of the buffer we should be inserting into.
|
private |
Max sample size in this moving average.
1.8.13