Example #1
0
        public void Subtract()
        {
            initializeArrays();

            Vector3Fallbacks.Subtract(vec1, vec2, result);

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

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