Bagaimana cara menjepit nilai

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