Garry's Mod Wiki

Lerp

number Lerp( number t, number from, number to )

Description

Performs a linear interpolation from the start number to the end number.

This function provides a very efficient and easy way to smooth out movements.

Arguments

1 number t
The fraction for finding the result. This number is clamped between 0 and 1.
2 number from
The starting number. The result will be equal to this if delta is 0.
3 number to
The ending number. The result will be equal to this if delta is 1.

Returns

1 number
The result of the linear interpolation, (1 - t) * from + t * to.

Page Links


Special Pages


Wikis

?

Render Time: 50ms

Session 0
DB GetPage 2
Generate Html 15
SaveChanges 23
Render Body 0
Render Sidebar 8