ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:lerp

Table of Contents

lerp

fixed lerp(fixed a, fixed b, fixed alpha)

Description

Performs linear interpolation (or extrapolation) between two numbers and returns the result.

Examples

lerp(A, B, 0.0) -> A
lerp(A, B, 1.0) -> B
lerp(A, B, 0.5) -> (A + B) / 2 // Average of a and b.
functions/lerp.1489589401.txt.gz · Last modified: 2017/03/15 16:50 by korshun