format
typescript
Mathf.Lerp(left, right, t)class: Mathf
description
Performs a linear interpolation between the left and right values using the specified value.
parameter
| param_name | type | description |
|---|---|---|
| left | number | The left value. |
| right | number | The right value. |
| t | number | The specified value. |
return
| type | description |
|---|---|
number | The interpolated float value between the two input float values. |
code example
typescript
// Performs a linear interpolation between q1 and q2 using t.
let lerp = Mathf.Lerp(1, 2, 0.5); // lerp = 1.5