/** * Solves the transformation matrix system of linear equations * for the given right-hand side vector. * * @param b the vector for the right-hand side of the system * @return the solution vector * @return null if no solution could be determined */ private double[] solve(double[] b) { double[][] a = new double[][] { { src0.x, src0.y, 1 }, { src1.x, src1.y, 1}, { src2.x, src2.y, 1} }; return Matrix.solve(a, b); } }
/** * Solves the transformation matrix system of linear equations * for the given right-hand side vector. * * @param b the vector for the right-hand side of the system * @return the solution vector * @return null if no solution could be determined */ private double[] solve(double[] b) { double[][] a = new double[][] { { src0.x, src0.y, 1 }, { src1.x, src1.y, 1}, { src2.x, src2.y, 1} }; return Matrix.solve(a, b); } }