Remap numbers limit

This is probably something trivial to the code monsters here. My question is the following:
let’s say I trying to remap value a; the source domain is between m and n while the target domain is set between p and q. What I would like would be to limit the remapped value of a, let’s call it b to the value of q even if a takes values larger than n. The same would apply also if a<m; b=p
Thanks in advance!

Hi - I would think that you can use the Graph Mapper for this:

1 Like

Seems to work perfectly!
Thank you @wim

buuuuut… my promblem is slightly more complicated (maybe I didn’t explain it properly):
let’s say that my source domain is 2 To 3 and my target domain is 0 To 100; while my input slider takes values from 0 To 10. What I am after is a method that outputs 0 whan my slider is in the interval 0-2; outputs the remapped values for when the slider is in the source domain; and outputs 100 when the slider is in the 3-10 range. I could build a small example if it makes things more clear.

You might want “C” output?

1 Like

Looks like it does the job! I’ll play around with it and I’ll get back to you.

Thank you both for your time.