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
/
EaseInSine.js
5 lines
(4 loc)
•
205 B
JavaScript
View Raw
1
2
3
4
5
exports
.
__esModule
=
true
;
exports
.
EaseInSine
=
function
(
from
, to, currentFrame, totalFrames
) {
return
-(to -
from
) *
Math
.
cos
(currentFrame / totalFrames * (
Math
.
PI
/
2
)) + (to -
from
) +
from
; };