lerp()


Syntax

lerp(a, b, t)

Returns

Number

Description

Linearly interpolates between values a and b by the proportion t. The result is clamped between a and b.

Arguments

  • a (Number): The starting value.
  • b (Number): The target value.
  • t (Number): The interpolation fraction (typically 0 to 1).