Abacus.DoublePrecision.Matrix44Tests.AssertEqualWithinReason C# (CSharp) Method

AssertEqualWithinReason() static private method

Helper to encapsulate asserting that two Matrix44s are equal.
static private AssertEqualWithinReason ( Matrix44 a, Matrix44 b ) : void
a Matrix44
b Matrix44
return void
        internal static void AssertEqualWithinReason (Matrix44 a, Matrix44 b)
        {
            Double tolerance;
            MathsTests.TestTolerance(out tolerance);

            Assert.That(a.R0C0, Is.EqualTo(b.R0C0).Within(tolerance));
            Assert.That(a.R0C1, Is.EqualTo(b.R0C1).Within(tolerance));
            Assert.That(a.R0C2, Is.EqualTo(b.R0C2).Within(tolerance));
            Assert.That(a.R0C3, Is.EqualTo(b.R0C3).Within(tolerance));

            Assert.That(a.R1C0, Is.EqualTo(b.R1C0).Within(tolerance));
            Assert.That(a.R1C1, Is.EqualTo(b.R1C1).Within(tolerance));
            Assert.That(a.R1C2, Is.EqualTo(b.R1C2).Within(tolerance));
            Assert.That(a.R1C3, Is.EqualTo(b.R1C3).Within(tolerance));

            Assert.That(a.R2C0, Is.EqualTo(b.R2C0).Within(tolerance));
            Assert.That(a.R2C1, Is.EqualTo(b.R2C1).Within(tolerance));
            Assert.That(a.R2C2, Is.EqualTo(b.R2C2).Within(tolerance));
            Assert.That(a.R2C3, Is.EqualTo(b.R2C3).Within(tolerance));

            Assert.That(a.R3C0, Is.EqualTo(b.R3C0).Within(tolerance));
            Assert.That(a.R3C1, Is.EqualTo(b.R3C1).Within(tolerance));
            Assert.That(a.R3C2, Is.EqualTo(b.R3C2).Within(tolerance));
            Assert.That(a.R3C3, Is.EqualTo(b.R3C3).Within(tolerance));
        }
Matrix44Tests