Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Mathf.LerpUnclamped

Switch to Manual
public static float LerpUnclamped(float a, float b, float t);

Parameters

Description

Linearly interpolates between a and b by t.

The parameter t is not clamped and values outside the range [0, 1] will result in a return value outside the range [a, /b/].

When t = 0 returns a.
When t = 1 returns b.
When t = 0.5 returns the midpoint of a and b.

See Also: Lerp.