Lerp: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Client & Server|1.0.3}} {{FuncDescription|Interpolates between a and b with the parameter t. }} {{FuncSyntax|Lerp(t, a, b)}} {{FuncParameters}} {{FuncParam|...")
 
No edit summary
 
Line 19: Line 19:


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[LerpVector]]

Latest revision as of 18:07, 7 February 2020

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