示例#1
0
        public void AbsMax_EqualsAbsFallback(int n)
        {
            // chosen by fair dice roll
            // guaranteed to be random
            Random       _rng     = new Random(4);
            Span <float> testData = new float[n];

            for (int i = 0; i < n; i++)
            {
                testData[i] = (float)_rng.NextDouble();
            }

            Assert.Equal(AbsMaxExtensions.AbsMaxFallback(testData), AbsMaxExtensions.AbsMax(testData));
        }
示例#2
0
 public void AbsMax_Valid_AbsMax(float[] array, float expected)
 {
     Assert.Equal(expected, AbsMaxExtensions.AbsMax(array));
 }
示例#3
0
 public float MaxAbs() => AbsMaxExtensions.AbsMax(_data);