Search Results for

    Show / Hide Table of Contents

    Class SmoothedVector

    Smoothed window for a Vector3 value.

    Inheritance
    Object
    SmoothedWindow<Vector3>
    SmoothedVector
    Inherited Members
    SmoothedWindow<Vector3>.Samples
    SmoothedWindow<Vector3>.CurrentIdx
    SmoothedWindow<Vector3>.Count
    Namespace: nickmaltbie.OpenKCC.Utils
    Assembly: cs.temp.dll.dll
    Syntax
    public class SmoothedVector : SmoothedWindow<Vector3>

    Constructors

    SmoothedVector(Int32)

    Create a smoothed vector with a given number of samples..

    Declaration
    public SmoothedVector(int size)
    Parameters
    Type Name Description
    Int32 size

    Size of smoothing window.

    Fields

    sum

    Running sum of the values stored in samples.

    Declaration
    protected Vector3 sum
    Field Value
    Type Description
    Vector3

    Methods

    AddSample(Vector3)

    Adds a sample to the smoothing window at the next available space. Will overwrite data if any data is there.

    Declaration
    public override Vector3 AddSample(Vector3 value)
    Parameters
    Type Name Description
    Vector3 value
    Returns
    Type Description
    Vector3

    Previous value removed.

    Overrides
    nickmaltbie.OpenKCC.Utils.SmoothedWindow<Vector3>.AddSample(Vector3)

    Average()

    Returns the average of all samples in the window.

    Declaration
    public Vector3 Average()
    Returns
    Type Description
    Vector3
    In This Article
    Back to top OpenKCC Documentation