Getting the smallest value out of a list of number

Although this seems very simple, but i am unable to figure it out. Maybe there a component that does the exact thing, but how can i pick a smallest number out of a list of random numbers?

Found it, its using sorting the list using sort list component and then using list item to pick the first or last item depending you want maximum or minimum value

I hope you know that indice -1 in list gives you the last
You can also use a bounds/domain components which output min and max.
http://rhino.github.io/components/mathematics/bounds.html
http://rhino.github.io/components/mathematics/deconstructDomain.html

2 Likes

The “Bounds” component will give you the minimum and maximum values without the need to sort the list (it’s faster).

image

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

4 Likes

Thanks Giulio, much apprecitated :slight_smile: