Disregarding differences in precision, that expression is equivalent to
float lerp(float a, float b, float f)
{
return a + f * (b - a);
}
That's 2 additions/subtractions and 1 multiplication instead of 2 addition/subtractions and 2 multiplications.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…