Class SmoothFloat | Unity Reflect | 1.1.0-preview.6
docs.unity3d.com
    Show / Hide Table of Contents

    Class SmoothFloat

    Calculates a 'smooth' values of a float based on history. 1d-version of the PhysicsTracker

    Inheritance
    Object
    SmoothFloat
    Namespace: UnityEditor.Experimental.EditorVR.Helpers
    Syntax
    public class SmoothFloat

    Properties

    predictedValue

    Declaration
    public float predictedValue { get; }
    Property Value
    Type Description
    Single

    speed

    Declaration
    public float speed { get; }
    Property Value
    Type Description
    Single

    Methods

    Reset(Single)

    Sets the Smoothed Float value to a 'known' linear state

    Declaration
    public void Reset(float currentValue)
    Parameters
    Type Name Description
    Single currentValue

    The expected value that the Smoothed Float should have and predict to have until new updates

    Update(Single, Single)

    Takes in a new raw value to determine the smoothed value

    Declaration
    public void Update(float newValue, float timeSlice)
    Parameters
    Type Name Description
    Single newValue

    The 'raw' up to date value we are tracking

    Single timeSlice

    How much time has passed since the last update

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023