ikpil / DotRecast

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

CyclicBuffer optimizations #55

Closed wrenge closed 8 months ago

wrenge commented 9 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 8 months ago

merged! thank you!