Grasshopper

algorithmic modeling for Rhino

I have a list of values lets say:

 

20, 8, 5, 16, 10

 

I then want the values to be flipped like so:

 

5, 16, 20 ,8, 10

 

so that the low data = the high data/ the data is inverted

 

My first thought was to take the list, sort it from hight to low and low to high, flip the values then resort them back in the original order but im not quit sure if this is achievable in GH. I might need to dig into a C# component to sort the array within a loop. If someone could lend me a hand that would be great. 

 

 

 

 

Views: 1512

Replies to This Discussion

I guess this is something you want, test it before using it though.

 

Attachments:
perfect

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service