I did succeed to merge my lists and somehow part of my filtering script is working.
var list = zlist.Union(alist)
.Union(blist)
.Union(clist)
.Union(dlist)
.Union(elist)
.Union(flist)
.Union(glist)
.Union(hlist)
.Union(jlist)
.Union(klist)
.Union(mlist)
.Union(nlist)
.Union(olist)
.Union(plist)
.Union(qlist)
.Union(rlist)
.Union(slist)
.Union(zzlist)
.ToList();
double minDistance = list.Min(no => Math.Abs(fibo- no));
double closest =list.First(no => Math.Abs(fibo- no) == minDistance);
var output = String.Join(", ", closest);
Print(closest);
What i cant figure out is why the Output Window returns more than one answer when it should be returning only one.
If i do Print(minDistance) i get numbers from the first part of the script and if i do Print(closest) i get another filtering and return closest number of fibo in all the Union list.
But even if the numbers are different in minDistance and closest in the end the OnRender still return more than one number like you can see in the attach file.
Is it a code problem or Print() limitation or the fact that OnRender refresh every tick and throw at the same time more than one closest number from the fibo variable?
Comment