language: C++ 4.7.2 (gcc-4.7.2)
date: 109 days 8 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
//Convience functions that scale the result for you, scaling both the duration and the value.
float ScaledEase(const EaseFunction &easeFunction, float currentTime, FloatRange valueRange, FloatRange timeRange)
{
    //Calculate the current position in the easing function, after adjusting 'currentTime' to the range (0.0 - 1.0).
    float easePos = easeFunction(timeRange.GetFrom(currentTime));
    
    //Calculate the result.
    float result = valueRange.begin;
    result += (valueRange.GetSize() * easePos);
    
    return result; 
}