refactor: list pool initial count and capacity parameters added

This commit is contained in:
2025-06-09 20:36:39 +03:00
parent f56d6a7fc8
commit 30ccab1b93
4 changed files with 14 additions and 14 deletions

View File

@@ -6,7 +6,7 @@ namespace Syntriax.Engine.Physics2D;
public class RaycastResolver2D : IRaycastResolver2D
{
private readonly ListPool<Line2D> lineCacheQueue = new(() => new(4));
private readonly ListPool<Line2D> lineCacheQueue = new(initialListCapacity: 4);
RaycastResult? IRaycastResolver2D.RaycastAgainst<T>(T shape, Ray2D ray, float length)
{