There was an error while loading. Please reload this page.
Linear interpolation between two numbers or two vectors.
r = pymath.interpolate_linear(v, w, t)
v
number
t == 0
w
t == 1
t
r
v + (w - v) * t
[0, 1]
pymath.clamp
pymath.interpolate_quat
pymath.interpolate_cubic
local x = pymath.interpolate_linear(0, 10, 0.25) -- x == 2.5 local p = pymath.interpolate_linear({0, 0, 0}, {10, 20, 30}, 0.5) -- p == {5, 10, 15} -- t outside [0, 1] extrapolates local y = pymath.interpolate_linear(0, 10, 1.5) -- y == 15.0
Minimum PYTHA Version: V27
pymath, pymath.clamp, pymath.smooth_step, pymath.interpolate_quat, pymath.interpolate_cubic