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

core/tween/easing_function/exponential

지수 곡선.

Exponential curve.

예제Example끝과 가운데 값Values at the ends and the middle
use vanilla::easing_function::exponential;

assert_eq!(exponential::ease_in(0.0), 0.0);
assert_eq!(exponential::ease_out(1.0), 1.0);
assert!((exponential::ease_in(0.5) - 0.03125).abs() < 1e-6);
assert!((exponential::ease_out(0.5) - 0.96875).abs() < 1e-6);

함수Functions

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

천천히 시작한다.

Starts slowly.

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

반환Returnsf64 보간 비율. (0 ~ 1, 0 에서 0, 1 에서 1)Interpolation ratio. (0 ~ 1, 0 at 0, 1 at 1)

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

천천히 끝난다.

Ends slowly.

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

반환Returnsf64 보간 비율. (0 ~ 1, 0 에서 0, 1 에서 1)Interpolation ratio. (0 ~ 1, 0 at 0, 1 at 1)

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

천천히 시작하고 천천히 끝난다.

Starts slowly and ends slowly.

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

반환Returnsf64 보간 비율. (0 ~ 1, 0 에서 0, 1 에서 1)Interpolation ratio. (0 ~ 1, 0 at 0, 1 at 1)