docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SmoothStepFloat

    Interpolate between two values a and b by ratio t with smoothing at the start and end.

    Implements
    IInterpolator<float>
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Splines.Interpolators
    Assembly: Unity.Splines.dll
    Syntax
    public struct SmoothStepFloat : IInterpolator<float>

    Methods

    Interpolate(float, float, float)

    Interpolates between a and b by ratio t with smoothing at the limits. This function interpolates between min and max in a similar way to Lerp. However, the interpolation will gradually speed up from the start and slow down toward the end. This is useful for creating natural-looking animation, fading and other transitions.

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

    Start value, returned when t = 0.

    float b

    End value, returned when t = 1.

    float t

    Interpolation ratio.

    Returns
    Type Description
    float

    The interpolated result between the two values.

    Implements

    IInterpolator<T>
    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)