예제 #1
0
        public void Cross()
        {
            initializeArrays();

            Vector3Fallbacks.Cross(vec1, vec2, result);

            for (int i = 0; i < arrLength; i++)
            {
                Assert.True(result[i].ApproximatelyEquals(vec1[i].Cross(vec2[i])));
            }
        }
예제 #2
0
        public void Cross()
        {
            Assert.True(Avx.IsSupported);
            initializeArrays();

            Vector3Fallbacks.Cross(vec1, vec2, result);
            Vector3Avx.Cross(vec1, vec2, actual);

            for (int i = 0; i < arrLength; i++)
            {
                Assert.True(result[i].ApproximatelyEquals(actual[i]),
                            $"index: {i}, result: {result[i]}, actual: {actual[i]}");
            }
        }