mathLerp

Linearly interpolates between two values. Takes a (start value), b (end value), t (interpolation factor). Returns a value between a and b based on interpolation factor t.

Mathematics

Parameters & Returns

Parameters

a Double
b Double
t Double

Returns

Double

Quick Summary

Linearly interpolates between two values. Takes a (start value), b (end value), t (interpolation factor). Returns a value between a and b based on interpolation factor t.

Technical Exegesis...

Returns a value between a and b based on interpolation factor t. When t=0 returns a, when t=1 returns b, and values between 0 and 1 give proportional intermediate values.

Formula: a + (b - a) * t. Commonly used for smooth transitions, animations, and blending values. t is not clamped, so values outside [0,1] will extrapolate.

Example

Example.bam
; No example implemented yet