Navigation
API > API/Runtime > API/Runtime/Core
This class calculates a moving window average. Its designed to be used with floats or doubles and keeps track of the average with every value pushed so is ideal when there is a one to one or one to many relationship between calls to PushValue() and GetMovingWindowAverage() respectively.
| Name | FMovingWindowAverageFast |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Math/MovingWindowAverageFast.h |
| Include Path | #include "Math/MovingWindowAverageFast.h" |
Syntax
template<typename T, int32 ArraySize>
class FMovingWindowAverageFast
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMovingWindowAverageFast() |
Math/MovingWindowAverageFast.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AverageValue | T | Math/MovingWindowAverageFast.h | ||
| NumValuesUsed | int32 | Math/MovingWindowAverageFast.h | ||
| RemoveNextIdx | int32 | The array Index of the next item to remove when the moving window is full | Math/MovingWindowAverageFast.h | |
| TotalValues | T | Math/MovingWindowAverageFast.h | ||
| ValuesArray | TStaticArray< T, ArraySize > | Math/MovingWindowAverageFast.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T GetAverage() |
Math/MovingWindowAverageFast.h | ||
void PushValue
(
T Value |
Math/MovingWindowAverageFast.h |