iTween.FloatUpdate C# (CSharp) Method

FloatUpdate() public static method

Returns a float that is eased between a current and target value by the supplied speed.
public static FloatUpdate ( float currentValue, float targetValue, float speed ) : float
currentValue float /// A the starting or initial value ///
targetValue float /// A the target value that the current value will be eased to. ///
speed float /// A to be used as rate of speed (larger number equals faster animation) ///
return float
    public static float FloatUpdate(float currentValue, float targetValue, float speed)
    {
        float diff = targetValue - currentValue;
        currentValue += (diff * speed) * Time.deltaTime;
        return (currentValue);
    }
iTween