//Convience functions that scale the result for you, scaling both the duration and the value.
float ScaledEase(const EaseFunction &easeFunction, float currentTime, float startPos, float stopPos, float startTime, float stopTime)
{
    //Get the range of the values.
    float timeRange = (stopTime - startTime);
                
    //Adjust the position from (begin, end) to (0, range), and convert to float.
    float adjustedTime = (currentTime - startTime);
                
    //Convert to the (0.0f, 1.0f) scale.
    adjustedTime /= timeRange;
    
    //Calculate the current position in the easing function, after adjusting 'currentTime' to the range (0.0 - 1.0).
    float easePos = easeFunction(adjustedTime);
    
    //Get the range to convert the ease into.
    float distanceRange = (stopPos - startPos);
    
    //Calculate and return the result.
    return (distanceRange * easePos) + startPos;
}