float exp_decay float T_const float if T_const 001 return else float e

1
2
3
4
5
6
7
8
9
float exp_decay (float T_const, float t)
{
if (T_const <= 0.001) {
return 0.0;
} else {
float r = exp(- t / T_const);
return r;
}
}