MCPcopy Create free account
hub / github.com/LaVache-FR/AnimationUtil / BackInOut

Class BackInOut

fr/lavache/anime/Easing.java:430–444  ·  view source on GitHub ↗

Back easing in/out - backtracking slightly, then reversing direction and moving to target, then overshooting target, reversing, and finally coming back to target.

Source from the content-addressed store, hash-verified

428 * then overshooting target, reversing, and finally coming back to target.
429 */
430 class BackInOut extends Back {
431 public BackInOut() {
432 super();
433 }
434
435 public BackInOut(float overshoot) {
436 super(overshoot);
437 }
438
439 public float ease(float t, float b, float c, float d) {
440 float s = getOvershoot();
441 if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
442 return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
443 }
444 }
445}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected