7 lines
180 B
JavaScript
Raw Permalink Normal View History

2026-05-31 13:21:13 +02:00
const progress = (from, to, value) => {
const toFromDifference = to - from;
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
};
export { progress };