forked from mirror/DotRecast
Optimization: reduce number of allocations on hot path.
This commit is contained in:
parent
4b8cd8e31b
commit
7dfac39408
|
@ -156,7 +156,7 @@ namespace DotRecast.Recast
|
|||
float axisOffset, int axis)
|
||||
{
|
||||
// How far positive or negative away from the separating axis is each vertex.
|
||||
float[] inVertAxisDelta = new float[12];
|
||||
Span<float> inVertAxisDelta = stackalloc float[12];
|
||||
for (int inVert = 0; inVert < inVertsCount; ++inVert)
|
||||
{
|
||||
inVertAxisDelta[inVert] = axisOffset - inVerts[inVertsOffset + inVert * 3 + axis];
|
||||
|
|
Loading…
Reference in New Issue