toggle menu
SceneView
androidJvm
switch theme
search in API
sceneview
/
com.google.ar.sceneform.utilities
/
MovingAverage
Moving
Average
open
class
MovingAverage
Calculates an exponentially weighted moving average for a series of data.
Members
Constructors
Moving
Average
Link copied to clipboard
constructor
(
initialSample
:
Double
)
Construct an object to track the exponentially weighted moving average for a series of data.
constructor
(
initialSample
:
Double
,
weight
:
Double
)
Construct an object to track the exponentially weighted moving average for a series of data.
Properties
average
Link copied to clipboard
open
val
average
:
Double
DEFAULT_WEIGHT
Link copied to clipboard
val
DEFAULT_WEIGHT
:
Double
=
0.8999999761581421
Functions
add
Sample
Link copied to clipboard
open
fun
addSample
(
sample
:
Double
)
Add a sample and calculate a new average.