Back easing in/out - backtracking slightly, then reversing direction and moving to target, then overshooting target, reversing, and finally coming back to target.
| 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected