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)); }
public void AbsMax_Valid_AbsMax(float[] array, float expected) { Assert.Equal(expected, AbsMaxExtensions.AbsMax(array)); }
public float MaxAbs() => AbsMaxExtensions.AbsMax(_data);