docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Interpolate

    Interpolate(T, T, float)

    Calculate a value between from and to at time interval.

    Declaration
    T Interpolate(T from, T to, float t)
    Parameters
    Type Name Description
    T from

    The starting value. At t = 0 this method should return an unmodified 'from' value.

    T to

    The ending value. At t = 1 this method should return an unmodified 'to' value.

    float t

    A percentage between 'from' and 'to'. Must be between 0 and 1.

    Returns
    Type Description
    T

    A value between 'from' and 'to'.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)