vanilladocs
vanillapunch.com
API / core/tween/easing_function/back

core/tween/easing_function/back

뒤로 살짝 물러났다가 간다.

Pulls back slightly, then goes.

예제Example0 아래와 1 위로 넘치는 값Values that overshoot below 0 and above 1
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

함수functionpub fn ease_in(progress: f64) -> f64#0.4.0 부터since 0.4.0소스source

뒤로 물러났다가 출발한다.

Pulls back, then sets off.

progressf64
진행률. (0 ~ 1)Progress. (0 ~ 1)

반환Returnsf64 보간 비율. (0 에서 0, 1 에서 1, 시작 쪽에서 0 아래로 내려간다)Interpolation ratio. (0 at 0, 1 at 1, dips below 0 near the start)

함수functionpub fn ease_out(progress: f64) -> f64#0.4.0 부터since 0.4.0소스source

끝을 살짝 넘었다가 돌아온다.

Slightly overshoots the end, then comes back.

progressf64
진행률. (0 ~ 1)Progress. (0 ~ 1)

반환Returnsf64 보간 비율. (0 에서 0, 1 에서 1, 끝 쪽에서 1 을 넘는다)Interpolation ratio. (0 at 0, 1 at 1, goes over 1 near the end)

함수functionpub fn ease_in_out(progress: f64) -> f64#0.4.0 부터since 0.4.0소스source

시작에서 물러나고 끝에서 넘친다.

Pulls back at the start and overshoots at the end.

progressf64
진행률. (0 ~ 1)Progress. (0 ~ 1)

반환Returnsf64 보간 비율. (0 에서 0, 1 에서 1, 시작 쪽에서 0 아래로, 끝 쪽에서 1 위로 넘친다)Interpolation ratio. (0 at 0, 1 at 1, dips below 0 near the start and overshoots above 1 near the end)