UNPKG
@drozdik.m/lerp
Version:
latest (1.0.1)
1.0.1
1.0.0
Collection of lerp functions.
github.com/drozdik-m/js-alpha-library
drozdik-m/js-alpha-library
@drozdik.m/lerp
/
dist
/
EaseInOutSine.js
5 lines
(4 loc)
•
198 B
JavaScript
View Raw
1
2
3
4
5
exports
.
__esModule
=
true
;
exports
.
EaseInOutSine
=
function
(
from
, to, currentFrame, totalFrames
) {
return
-(to -
from
) /
2
* (
Math
.
cos
(
Math
.
PI
* currentFrame / totalFrames) -
1
) +
from
; };