Function lerp
#include <macaw.h>double lerp(double a, double b, double t);
Finds the number part of the way from one number to another, for smooth movement and fades.
Parameters
adouble- Where it starts, when
tis 0. bdouble- Where it ends, when
tis 1. tdouble- How far along, from 0 to 1: 0.5 is halfway. Numbers outside that go past
aorb.
Returns double
a + (b - a) * t.