A base class for Back easings.
| 341 | * A base class for Back easings. |
| 342 | */ |
| 343 | abstract class Back implements Easing { |
| 344 | /** |
| 345 | * The default overshoot is 10% (1.70158). |
| 346 | */ |
| 347 | public static final float DEFAULT_OVERSHOOT = 1.70158f; |
| 348 | |
| 349 | private float overshoot; |
| 350 | |
| 351 | /** |
| 352 | * Creates a new Back instance with the default overshoot (1.70158). |
| 353 | */ |
| 354 | public Back() { |
| 355 | this(DEFAULT_OVERSHOOT); |
| 356 | } |
| 357 | |
| 358 | /** |
| 359 | * Creates a new Back instance with the specified overshoot. |
| 360 | * |
| 361 | * @param overshoot the amount to overshoot by -- higher number |
| 362 | * means more overshoot and an overshoot of 0 results in |
| 363 | * cubic easing with no overshoot |
| 364 | */ |
| 365 | public Back(float overshoot) { |
| 366 | this.overshoot = overshoot; |
| 367 | } |
| 368 | |
| 369 | /** |
| 370 | * Returns the overshoot for this easing. |
| 371 | * |
| 372 | * @return this easing's overshoot |
| 373 | */ |
| 374 | public float getOvershoot() { |
| 375 | return overshoot; |
| 376 | } |
| 377 | |
| 378 | /** |
| 379 | * Sets the overshoot to the given value. |
| 380 | * |
| 381 | * @param overshoot the new overshoot |
| 382 | */ |
| 383 | public void setOvershoot(float overshoot) { |
| 384 | this.overshoot = overshoot; |
| 385 | } |
| 386 | } |
| 387 | |
| 388 | /////////// BOUNCE EASING: exponentially decaying parabolic bounce ////////////// |
| 389 |
nothing calls this directly
no outgoing calls
no test coverage detected