Engines/FlatRedBallXNA/FlatRedBall/Math/RollingAverage.cs
/// <summary>
/// Adds a value to the RollingAverage.  The oldest value is discarded if the Capacity has been reached. 
/// </summary>
/// <param name="value">The value to add.</param>
Adds a value to the RollingAverage.  The oldest value is discarded if the Capacity has been reached.
Adds a value to the RollingAverage . The oldest value is discarded if the Capacity has been reached .
public void AddValue(float value)
        {
            if (IsRadian)
            {
                MathFunctions.RegulateAngle(ref value);
            }
            mValues.Add(value);
            if (mValues.Count > mCapacity)
            {
                mValues.RemoveAt(0);
            }
        }
public void AddValue ( float value ) { if ( IsRadian ) { MathFunctions . RegulateAngle ( ref value ) ; } mValues . Add ( value ) ; if ( mValues . Count > mCapacity ) { mValues . RemoveAt ( 0 ) ; } }
Adds a value to the RollingAverage.
Adds a value to the RollingAverage .
value
float
The value to add.
The value to add .