public Vec2[] GetVec2Array(int argLength)
{
if (!avecs.ContainsKey(argLength))
{
var ray = new Vec2[argLength];
for (int i = 0; i < argLength; i++)
{
ray[i] = new Vec2();
}
avecs.Add(argLength, ray);
}
Debug.Assert(avecs[argLength].Length == argLength); //Array not built with correct length
return avecs[argLength];
}