Function to Return a Value when greater than

Hello,

I am looking for some help with creating a function in Grasshopper where I am adding two numbers. What I want is this: if the sum of two values is greater than x, then the output value = x. But if the sum is less than x then the output is whatever the sum is.

Example:
If X is 120
Then 100+30 would output 120
Or 100+10 would output 110

Just not sure how I would create a function node that returns this as a single output

seems you want an ‘if-then’ statement?
Check this:

1 Like

You can also use “Min” component…

1 Like

Min works, thanks! and thanks for posting the function as well, really helpful!