easings.h 198 B

1234567891011
  1. #pragma once
  2. static inline float cubic_ease_in_out(float t)
  3. {
  4. if (t < 0.5f) {
  5. return 4.0f * t * t * t;
  6. } else {
  7. float temp = (2.0f * t - 2.0f);
  8. return (t - 1.0f) * temp * temp + 1.0f;
  9. }
  10. }