Setting a ceiling on number remapping

I’ve probably rewritten this a dozen times trying to be clear. Sorry if it’s not.

I’m looking for a number remapping tool that will do the following:

I have a list of number [1,2,3,4,5,6,7,8,9,10]
I want to remap from the domain (3,8) to (0,5) and have the result be the following: [0,0,0,1,2,3,4,5,5,5]
Note how number outside the start domain get set to the minimum or maximum values of the new domain.

Is anyone familiar with a tool or method to do as such?

Combine two conditional statements with remapping.
Like if x < domainStart, x = domainStart & if x > domainEnd, x = domainEnd & then just remap the resulting list. You could use replace list item & remap or expression component if you prefer a native solution or script it.

Check C output ( clipped number)

5 Likes

I feel so dumb, thanks for pointing that out.