gwnavruntime/world/floatstat.h Source File
Go to the documentation of this file.
10 #ifndef Navigation_FloatStat_H
11 #define Navigation_FloatStat_H
28 FloatStat(
const String& name,
KyUInt32 windowSize = 300) { Init(name, windowSize); }
30 void Init(
const String& name,
KyUInt32 windowSize = 300)
33 SetWindowSize(windowSize);
36 void SetWindowSize(
KyUInt32 windowSize)
38 m_values.Resize(windowSize);
45 const String& GetName()
const {
return m_name; }
46 KyFloat32 GetCurrent()
const {
return m_current; }
47 KyFloat32 GetAverage()
const {
return m_average; }
48 KyFloat32 GetMin()
const {
return m_min; }
49 KyFloat32 GetMax()
const {
return m_max; }
51 KyFloat32& GetWritableCurrent() {
return m_current; }
53 void SetCurrent(
KyFloat32 current) { m_current = current; }
69 Array<KyFloat32> m_values;
78 #endif // Navigation_FloatStat_H
FloatStat maintains current, average, min, max statistics in a sliding window of frames.
Definition: floatstat.h:23
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43