Find 2 values closest to zero in a spread (Dynamic Plugin)

Hello,

I’m sure this is incredibly simple but I’m hitting a brick wall each time I try and find a solution.

I’m using a dynamic plugin and want to find the 2 values in an array closest to Zero. Examples on-line from C-Sharp forums throw up errors when i try and use them in the vvvv C Sharp Editor.

Any help or pointers would be greatly appreciates,

Cheers

Andy

See attachment. Code found here.

ClosestSpreadsTake.7z (3.3 kB)

1 Like

So many things to learn in few lines of code… thank you, @bjoern.

Ah, Bjoern, Yhank You that’s brilliant. So so much C# to learn.

Andy

tnx bjoern