int BasicIntInterpolation::inOutQuintInterpolation(float startvalue, float endvalue, float time) { if (time < 0.f) return static_cast<int>(startvalue); if (time > 1.f) return static_cast<int>(endvalue); if (time < 0.5f) return inQuintInterpolation(startvalue, (startvalue + endvalue) / 2.f, time * 2.f); else return outQuintInterpolation((startvalue + endvalue) / 2.f, endvalue, time * 2.f - 1.f); }
float BasicFloatInterpolation::outInQuintInterpolation(float startvalue, float endvalue, float time) { if (time < 0.f) return startvalue; if (time > 1.f) return endvalue; if (time < 0.5f) return outQuintInterpolation(startvalue, (startvalue + endvalue) / 2.f, time * 2.f); else return inQuintInterpolation((startvalue + endvalue) / 2.f, endvalue, time * 2.f - 1.f); }