C# Class FlatRedBall.Math.RollingAverage

A class which can be used to store and calculate rolling averages for regular numbers and radians.
ファイルを表示 Open project: vchelaru/FlatRedBall

Public Methods

Method Description
AddValue ( float value ) : void

Adds a value to the RollingAverage. The oldest value is discarded if the Capacity has been reached.

Clear ( ) : void
RollingAverage ( int capacity ) : System

Creates a new RolllingAverage with capacity equalling the argument capacity value.

Method Details

AddValue() public method

Adds a value to the RollingAverage. The oldest value is discarded if the Capacity has been reached.
public AddValue ( float value ) : void
value float The value to add.
return void

Clear() public method

public Clear ( ) : void
return void

RollingAverage() public method

Creates a new RolllingAverage with capacity equalling the argument capacity value.
public RollingAverage ( int capacity ) : System
capacity int The maximum number of values that the RollingAverage can store.
return System