UNPKG

popmotion

Version:

The animator's toolbox

7 lines (5 loc) 180 B
const progress = (from, to, value) => { const toFromDifference = to - from; return toFromDifference === 0 ? 1 : (value - from) / toFromDifference; }; export { progress };