ikpil / DotRecast

DotRecast - a port of Recast & Detour, Industry-standard navigation mesh toolset for .NET, C#, Unity3D, games, servers
zlib License
516 stars 70 forks source link

CyclicBuffer optimizations #55

Closed wrenge closed 7 months ago

wrenge commented 7 months ago

1) Ditch ForEach(Action<T>) because it allocates 2) Implement Enumerator to support foreach keyword 3) Implement IEnumerable<T> to support Linq (don't use it though) 4) In ToArray() copy the whole block of memory (or rather two) instead of copying one by one

ikpil commented 7 months ago

merged! thank you!