2025-03-24 22:56:10 +01:00

7 lines
180 B
JavaScript

const progress = (from, to, value) => {
const toFromDifference = to - from;
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
};
export { progress };