Processors.Decay
Static Method in Processors
Declaration
public static float Decay(float input, float rate, float target = 0F)
Description
Decays the input back to zero over time at a given rate. The rate is multiplied by Time.deltaTime
.
Parameters
input | The input value to decay. |
rate | How quickly the input decays. |
target | The optional value to decay to, otherwise zero. |
Returns
float | The decayed input value. |
Overload
Declaration
public static double Decay(double input, double rate, double target = 0)
Description
Decays the input back to zero over time at a given rate. The rate is multiplied by Time.deltaTime
.
Parameters
input | The input value to decay. |
rate | How quickly the input decays. |
target | The optional value to decay to, otherwise zero. |
Returns
double | The decayed input value. |