2026-05-31 13:54:31 +02:00

7 lines
180 B
JavaScript

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