Exemplo n.º 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));
        }
Exemplo n.º 2
0
 public void AbsMaxFallback_Valid_AbsMax(float[] array, float expected)
 {
     Assert.Equal(expected, AbsMaxExtensions.AbsMaxFallback(array));
 }
Exemplo n.º 3
0
 public float MaxFallback() => AbsMaxExtensions.AbsMaxFallback(_data);