algorithmic modeling for Rhino
Hello everybody,
I have a proble with Data Management. I try to convert my Parameter List to specific Values. I have a list of parameters where the values are betwenn "0" and "1" so I want to seperate the values and get only 7 different values. For example this schould be like this:
The values between 0 and 0.5 will converted to 0.4 while the values betwenn 0.5 and 1 will converted to 0.8
Mathematical Discription:
if 0.0 < x < 0.5 than "0.4"
if 0.5 < x < 1.0 than "0.8"
I try to solve it with boleans (Or, And, Xor, Ternary etc. Gates) but not succes. Is there a possibility to solve it with Funktions? Or have any body for me a clue hove to convert datas tu specific values.
Thanks,
ILIAS
Tags:
if(x.Contains(double.NaN))
return;
List num = new List();
for(int i = 0; i < x.Count;i++)
{
if(x[i] > 0 && x[i] < 0.5)
num.Add(0.4);
else
num.Add(0.8);
}
A = num;
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by