Is it possible to use LINQ to transform a flat array of doubles containing coordinate tuples (x, y),i.e. [x0,y0, …, xN, yN] to an array of half the length containing the same coordinates wrapped in a Point-class, i.e. [p0, …, pN]?
Preferably .NET 3.5, but also interrested in 4.0.
You can use
.Batchfrom Jon Skeet’s morelinq:In all honestly, the simplest solution is probably using a method (here with
ints):