MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / lerp

Function lerp

extlibs/soloud/src/audiosource/speech/klatt.cpp:828–842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826}
827
828static float lerp(float a, float b, int t, int d)
829{
830 if (t <= 0)
831 {
832 return a;
833 }
834
835 if (t >= d)
836 {
837 return b;
838 }
839
840 float f = (float)t / (float)d;
841 return a + (b - a) * f;
842}
843
844static float interpolate(Slope *aStartSlope, Slope *aEndSlope, float aMidValue, int aTime, int aDuration)
845{

Callers 1

interpolateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected