Jak zacisnąć wartość według modułu

let d=max-min;
let c=((value-min)%d)+min;
Charming Copperhead