mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-22 20:31:11 +00:00
SmoothLerp function
This commit is contained in:
parent
7e237ec319
commit
f2ddf52bc0
2 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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]))
|
||||
|
|
Loading…
Reference in a new issue