fork download
  1. //Convience functions that scale the result for you, scaling both the duration and the value.
  2. float ScaledEase(const EaseFunction &easeFunction, float currentTime, FloatRange valueRange, FloatRange timeRange)
  3. {
  4. //Calculate the current position in the easing function, after adjusting 'currentTime' to the range (0.0 - 1.0).
  5. float easePos = easeFunction(timeRange.GetFrom(currentTime));
  6.  
  7. //Calculate the result.
  8. float result = valueRange.begin;
  9. result += (valueRange.GetSize() * easePos);
  10.  
  11. return result;
  12. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty