SmoothLerp function

This commit is contained in:
Andrei Drexler 2011-03-10 18:52:13 +00:00
parent 7e237ec319
commit f2ddf52bc0
2 changed files with 6 additions and 0 deletions

View File

@ -1816,3 +1816,8 @@ float SawTooth(int time, int period)
return 1.0f - (time % period) / ((float)period);
}
}
float SmoothLerp(float x)
{
return x * x * (3.f - 2.f * x);
}

View File

@ -1628,6 +1628,7 @@ int GetMaterialFromFlag(int flag);
float SawTooth(int time, int period);
float SmoothLerp(float x);
#define PULSE_SAWTOOTH_PERIOD 500
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))