Use primary constructor for QuadtreeItem

This commit is contained in:
Stefan Müller 2025-09-27 23:33:18 +02:00
parent f6e5a34278
commit 6f86e3576a

View File

@ -1,22 +1,16 @@
namespace SpatialCollections
{
internal struct QuadtreeItem<T>
internal struct QuadtreeItem<T>(T entity, int next)
{
/// <summary>
/// Index of the next item in the same leaf vertex.
/// </summary>
public int Next;
public int Next = next;
public T Entity;
public T Entity = entity;
public QuadtreeItem(T entity) : this(entity, -1)
{
}
public QuadtreeItem(T entity, int next)
{
Next = next;
Entity = entity;
}
}
}