Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
LERP / INTERPOLATE
[go: Go Back, main page]

LERP / INTERPOLATE

Syntax

=LERP(value, a, b)

=INTERPOLATE(value, a, b)

📘

The linear interpolation result is calculated as: (b - a) \* value + a

Arguments

ArgumentTypeDescription
valueNumberThe interpolation value. Value must be between 0 and 1 (values outside of the range will be constrained to that range).
aNumberThe first value to interpolate between.
bNumberThe second value to interpolate between.

Examples

=LERP(0.5, 0, 10)5
Interpolates between 0 and 10 at a proportion of 0.5

=LERP(0, 0, 10)0
Interpolates between 0 and 10 at a proportion of 0

=INTERPOLATE(1, 0, 10)10
Interpolates between 0 and 10 at a proportion of 1

=LERP(0.5, -2, 6)2
Interpolates between -2 and 6 at a proportion of 0.5