public void Inverse() { Matrix3x3d m = new Matrix3x3d((double)1, (double)0, (double)0, (double)2, (double)2, (double)3, (double)0, (double)5, (double)3); m = m.Inverse; Assert.IsTrue( Matrix3x3d.NearEqual(m, new Matrix3x3d( (double)1, (double)0, (double)0, (double)2.0 / (double)3.0, -1.0 / (double)3.0, 1.0 / (double)3.0, (double)-10.0 / (double)9.0, (double)5.0 / (double)9.0, (double)-2.0 / (double)9.0))); }
public void Multiplication2() { Matrix3x3d m = new Matrix3x3d((double)1, (double)0, (double)0, (double)2, (double)2, (double)3, (double)0, (double)5, (double)3); Matrix3x3d m_inv = new Matrix3x3d( (double)1, (double)0, (double)0, (double)2.0 / (double)3.0, -1.0 / (double)3.0, 1.0 / (double)3.0, (double)-10.0 / (double)9.0, (double)5.0 / (double)9.0, (double)-2.0 / (double)9.0); Matrix3x3d r = m * m_inv; Assert.IsTrue(Matrix3x3d.NearEqual(r, Matrix3x3d.Identity)); }