luxe-frontend/node_modules/motion-utils/dist/es/progress.mjs

16 lines
409 B
JavaScript

/*
Progress within given range
Given a lower limit and an upper limit, we return the progress
(expressed as a number 0-1) represented by the given value, and
limit that progress to within 0-1.
*/
/*#__NO_SIDE_EFFECTS__*/
const progress = (from, to, value) => {
const range = to - from;
return range ? (value - from) / range : 1;
};
export { progress };
//# sourceMappingURL=progress.mjs.map