# core/tween/easing_function/back (vanilla-engine 0.4.0)

> https://vanillapunch.com/docs/vanilla-engine/0.4.0/api/core/tween/easing_function/back/

Pulls back slightly, then goes.

Example: Values that overshoot below 0 and above 1

```rust
use vanilla::easing_function::back;

assert!(back::ease_in(0.5) < 0.0);
assert!(back::ease_out(0.5) > 1.0);
assert!((back::ease_in(1.0) - 1.0).abs() < 1e-6);
assert!(back::ease_out(0.0).abs() < 1e-6);
```

## Functions and constants

- `pub fn ease_in(progress: f64) -> f64` (method, since 0.4.0): Pulls back, then sets off.
  - `progress` f64: Progress. (0 ~ 1)
  - returns f64: Interpolation ratio. (0 at 0, 1 at 1, dips below 0 near the start)
- `pub fn ease_out(progress: f64) -> f64` (method, since 0.4.0): Slightly overshoots the end, then comes back.
  - `progress` f64: Progress. (0 ~ 1)
  - returns f64: Interpolation ratio. (0 at 0, 1 at 1, goes over 1 near the end)
- `pub fn ease_in_out(progress: f64) -> f64` (method, since 0.4.0): Pulls back at the start and overshoots at the end.
  - `progress` f64: Progress. (0 ~ 1)
  - returns f64: Interpolation ratio. (0 at 0, 1 at 1, dips below 0 near the start and overshoots above 1 near the end)
