Struct SmoothStepFloat
Interpolate between two values a and b by ratio t with smoothing at the start and end.
Inherited Members
Namespace: UnityEngine.Splines.Interpolators
Syntax
public struct SmoothStepFloat : IInterpolator<float>
Methods
Interpolate(Single, Single, Single)
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 |
---|---|---|
Single | a | Start value, returned when t = 0. |
Single | b | End value, returned when t = 1. |
Single | t | Interpolation ratio. |
Returns
Type | Description |
---|---|
Single | The interpolated result between the two values. |