BEPUutilitiesTests.BoundingTests.TestBoxRaySIMD C# (CSharp) Method

TestBoxRaySIMD() public static method

public static TestBoxRaySIMD ( int iterationCount ) : float
iterationCount int
return float
        public static float TestBoxRaySIMD(int iterationCount)
        {
            Ray ray;
            ray.Direction = new Vector3(1, 1, 1);
            ray.Position = new Vector3(-3);
            BoundingBox box;
            box.Min = new Vector3(-1);
            box.Max = new Vector3(1);

            float accumulator = 0;
            for (int i = 0; i < iterationCount; ++i)
            {
                float t;
                Ray.Intersects(ref ray, ref box, out t);
                Ray.Intersects(ref ray, ref box, out t);
                Ray.Intersects(ref ray, ref box, out t);
                Ray.Intersects(ref ray, ref box, out t);
                Ray.Intersects(ref ray, ref box, out t);
                Ray.Intersects(ref ray, ref box, out t);
                Ray.Intersects(ref ray, ref box, out t);
                Ray.Intersects(ref ray, ref box, out t);
                Ray.Intersects(ref ray, ref box, out t);
                Ray.Intersects(ref ray, ref box, out t);
                accumulator += t;
            }
            return accumulator;
        }