If statement

Hi guys,

how can I put following if statement in gh in one component?

If x < y then x = y, If x > y then x = y

I don't understand how to put it in one VB component.

Can anyone help me?

 

Thanks, Tanja

Load Previous Replies
  • up

    Arend

    Seems like the Min command to me.

    x= Math.Min(x,y), always takes the smallest of the two.

    or x = Math.Max(x,y) always takes the largest.

    Or the minimum command in grasshopper.

    2
    • up

      LBeverly

      This uses VB script. It's literally the only thing I can do with VB.

      • up

        Tanja Flower

        Sorry I have written something wrong. My fault.

        I want this in one component:

        If x<y then use y , if x>y then use x

        Thank you for all your ideas!!!

        The Max component is the right one. :)

         

        Thanks a lot!