public void Inverse() { Matrix2x2f m = new Matrix2x2f((float)5, (float)2, 1.0f, (float)3); m = m / m; Assert.IsTrue(Matrix2x2f.NearEqual(m, Matrix2x2f.Identity)); }
public void Mul() { Matrix2x2f m = new Matrix2x2f((float)2.0, (float)3.0, -1.0f, (float)2.0); m = m * m; Assert.IsTrue(Matrix2x2f.NearEqual(m, new Matrix2x2f(1.0f, (float)12, (float)-4, (float)1))); }
/// <summary> /// Solves a 2D system. /// </summary> /// <param name="S">The coefficients.</param> /// <param name="C">The constans.</param> /// <returns>Vector of solved values.</returns> public static Vector2f SolveSystem(Matrix2x2f S, Vector2f C) { return(S.Inverse * C); }