Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.Close
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.Close
|a||The start value.|
|b||The end value.|
|t||The interpolation between the two floats.|
float The float value as a result from the linear interpolation.
Linearly interpolates between
t with no limit to
t is not clamped and a value based on
is supported. If
t is less than zero, or greater than one, then LerpUnclamped
will result in a return value outside the range
a = 0.33f, and
b = 1.5f. If interpolator
t = -0.25f then the return
value is 0.0375f.
Details: The calculation (
a) is 1.17f. This is scaled by 0.25f and a result of
0.2925f is obtained. Subtracting this from
a (because the interpolant
t is negative)
results in 0.0375f.
See Also: Lerp.
Did you find this page useful? Please give it a rating: