Fluent Assertions: Approximately compare two 2D rectangular arrays <p>I'm able to approximately compare two 2D rectangular arrays in Fluent Assertions like this:</p> <pre><code>float precision = 1e-5f; float[,] expectedArray = new float[,] { { 3.1f, 4.5f}, { 2, 4} }; float[,] calculatedArray = new float[,] { { 3.09f, 4.49f}, { 2, 4} }; for (int y = 0; y &lt; 2; ++y) { for (int x = 0; x &lt; 2; ++x) { calculatedArray[y,x].Should().BeApproximately(expectedArray[y,x], precision); } } </code></pre> <p>but is there a cleaner way of achieving this (without the for loops)? For example, something in the same vein as this (which is for 1D arrays):</p> <pre><code>double[] source = { 10.01, 8.01, 6.01 }; double[] target = { 10.0, 8.0, 6.0 }; source.Should().Equal(target, (left, right) =&gt; Math.Abs(left-right) &lt;= 0.01); </code></pre> <p>The above solution for a 1D array comes from the question: <a href="http://stackoverflow.com/questions/17054636/fluent-assertions-compare-two-numeric-collections-approximately">Fluent Assertions: Compare two numeric collections approximately</a></p>