Lerp

From Onset Developer Wiki
Lerp

Type: Function
Context: Client & Server
Introduced: v1.0.3

Description

Interpolates between a and b with the parameter t.

Syntax

Lerp(t, a, b)

Parameters

  • t
    The interpolant, normally between 0.0 and 1.0
  • a
    Interpolate from.
  • b
    Interpolate to.

Return Value

  • Returns the interpolated value.

Example

--Will print 3.0
print(Lerp(0.5, 2.0, 4.0))

See also