docs.unity.cn
    Show / Hide Table of Contents

    Interface IInterpolator<T>

    An interface that provides interpolation functionality.

    Namespace: Unity.LiveCapture
    Syntax
    public interface IInterpolator<T>
    Type Parameters
    Name Description
    T

    The type of data to interpolate.

    Methods

    Interpolate(in T, in T, Single)

    Interpolates between a and b by factor t.

    Declaration
    T Interpolate(in T a, in T b, float t)
    Parameters
    Type Name Description
    T a

    The value to interpolate from.

    T b

    To value to interpolate to.

    Single t

    The interpolation factor.

    Returns
    Type Description
    T

    The interpolated value.

    Remarks


    • When t is 0 returns a.
    • When t is 1 returns b.
    • When t is 0.5 returns the midpoint of a and b.
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Monday, July 24, 2023