public static float TestBoxRayScalar(int iterationCount)
{
bRay ray;
ray.Direction = new bVector3(1, 1, 1);
ray.Position = new bVector3(-3, -3, -3);
bBoundingBox box;
box.Min = new bVector3(-1, -1, -1);
box.Max = new bVector3(1, 1, 1);
float accumulator = 0;
for (int i = 0; i < iterationCount; ++i)
{
float t;
ray.Intersects(ref box, out t);
ray.Intersects(ref box, out t);
ray.Intersects(ref box, out t);
ray.Intersects(ref box, out t);
ray.Intersects(ref box, out t);
ray.Intersects(ref box, out t);
ray.Intersects(ref box, out t);
ray.Intersects(ref box, out t);
ray.Intersects(ref box, out t);
ray.Intersects(ref box, out t);
accumulator += t;
}
return accumulator;
}