|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.math.FloatCounter
public class FloatCounter
Field Summary | |
---|---|
float |
average
The average value (total / count) |
int |
count
The amount of values added |
float |
latest
The latest raw value |
float |
max
The largest value |
WindowedMean |
mean
Provides access to the WindowedMean if any (can be null) |
float |
min
The smallest value |
float |
total
The sum of all values |
float |
value
The current windowed mean value |
Constructor Summary | |
---|---|
FloatCounter(int windowSize)
Construct a new FloatCounter |
Method Summary | |
---|---|
void |
put(float value)
Add a value and update all fields. |
void |
reset()
Reset all values to their default value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int count
public float total
public float min
public float max
public float average
public float latest
public float value
public final WindowedMean mean
Constructor Detail |
---|
public FloatCounter(int windowSize)
windowSize
- The size of the mean window or 1 or below to not use a windowed mean.Method Detail |
---|
public void put(float value)
value
- The value to addpublic void reset()
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |