#linear interpolation
def lerp(A, B, t):
return A + (B - A) * t
float lerp(float v0, float v1, float t) {
return (1 - t) * v0 + t * v1;
}
float Lerp(float A, float B, float t) {
return A + (B - A) * t;
}
//single line version:
float Lerp(float A, float B, float t) {return A + (B - A) * t;}