Пример #1
0
        public void Add()
        {
            initializeArrays();

            Vector3Fallbacks.Add(vec1, vec2, result);

            for (int i = 0; i < arrLength; i++)
            {
                Assert.True(result[i].ApproximatelyEquals(vec1[i] + vec2[i]));
            }
        }
Пример #2
0
        public void Add()
        {
            Assert.True(Avx.IsSupported);
            initializeArrays();

            Vector3Fallbacks.Add(vec1, vec2, result);
            Vector3Avx.Add(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]}");
            }
        }