Create a new {@link Matrix2d} and make it a copy of the given matrix.
Create a new {@link Matrix2d} and make it a copy of the upper left 2x2 of the given {@link Matrix3d}.
Create a new 2x2 matrix using the supplied double values. The order of the parameter is column-major, so the first two parameters specify the two elements of the first column.
Create a new {@link Matrix2d} and initialize its two columns using the supplied vectors.
Set the value of the matrix element at column 0 and row 0.
Set the value of the matrix element at column 0 and row 1.
Set the value of the matrix element at column 1 and row 0.
Set the value of the matrix element at column 1 and row 1.
Component-wise add <code>this</code> and <code>other</code>.
Get the current values of <code>this</code> matrix and store them into <code>dest</code>. <p> This is the reverse method of {@link #set(Matrix2d)} and allows to obtain intermediate calculation results when chaining multiple transformations.
Set this matrix to the identity.
Invert this matrix.
Linearly interpolate <code>this</code> and <code>other</code> using the given interpolation factor <code>t</code> and store the result in <code>this</code>. <p> If <code>t</code> is <code>0.0</code> then the result is <code>this</code>. If the interpolation factor is <code>1.0</code> then the result is <code>other</code>.
Multiply this matrix by the supplied <code>right</code> matrix. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the <code>right</code> matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code>, the transformation of the right matrix will be applied first!
Component-wise multiply <code>this</code> by <code>other</code>.
Pre-multiply this matrix by the supplied <code>left</code> matrix and store the result in <code>this</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the <code>left</code> matrix, then the new matrix will be <code>L * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>L * M * v</code>, the transformation of <code>this</code> matrix will be applied first!
Set <code>this</code> matrix to its own normal matrix. <p> Please note that, if <code>this</code> is an orthogonal matrix or a matrix whose columns are orthogonal vectors, then this method <i>need not</i> be invoked, since in that case <code>this</code> itself is its normal matrix. In this case, use {@link #set(Matrix2d)} to set a given Matrix2d to this matrix.
Compute a normal matrix from <code>this</code> matrix and store it into <code>dest</code>. <p> Please note that, if <code>this</code> is an orthogonal matrix or a matrix whose columns are orthogonal vectors, then this method <i>need not</i> be invoked, since in that case <code>this</code> itself is its normal matrix. In this case, use {@link #set(Matrix2d)} to set a given Matrix2d to this matrix.
Apply rotation about the origin to this matrix by rotating the given amount of radians. <p> The produced rotation will rotate a vector counter-clockwise around the origin. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code> , the rotation will be applied first! <p> Reference: <a href="https://en.wikipedia.org/wiki/Rotation_matrix#In_two_dimensions">http://en.wikipedia.org</a>
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the origin. <p> The produced rotation will rotate a vector counter-clockwise around the origin. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>R * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the rotation will be applied last! <p> In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use {@link #rotation(double) rotation()}. <p> Reference: <a href="https://en.wikipedia.org/wiki/Rotation_matrix#In_two_dimensions">http://en.wikipedia.org</a>
Set this matrix to a rotation matrix which rotates the given radians about the origin. <p> The produced rotation will rotate a vector counter-clockwise around the origin. <p> The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation. <p> In order to post-multiply a rotation transformation directly to a matrix, use {@link #rotate(double) rotate()} instead.
Apply scaling to this matrix by scaling the base axes by the given <code>xy.x</code> and <code>xy.y</code> factors, respectively. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * S * v</code>, the scaling will be applied first!
Apply scaling to this matrix by scaling the base axes by the given x and y factors. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * S * v</code> , the scaling will be applied first!
Apply scaling to this matrix by uniformly scaling all base axes by the given <code>xy</code> factor. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * S * v</code> , the scaling will be applied first!
Pre-multiply scaling to this matrix by scaling the base axes by the given x and y factors. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>S * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>S * M * v</code>, the scaling will be applied last!
Set this matrix to be a simple scale matrix, which scales all axes uniformly by the given factor. <p> The resulting matrix can be multiplied against another transformation matrix to obtain an additional scaling. <p> In order to post-multiply a scaling transformation directly to a matrix, use {@link #scale(double) scale()} instead.
Set this matrix to be a simple scale matrix.
Set this matrix to be a simple scale matrix which scales the base axes by <code>xy.x</code> and <code>xy.y</code> respectively. <p> The resulting matrix can be multiplied against another transformation matrix to obtain an additional scaling. <p> In order to post-multiply a scaling transformation directly to a matrix use {@link #scale(Vector2d) scale()} instead.
Set the elements of this matrix to the ones in <code>m</code>.
Set the elements of this matrix to the left 2x2 submatrix of <code>m</code>.
Set the elements of this matrix to the upper left 2x2 of the given {@link Matrix3d}.
Set the values within this matrix to the supplied double values. The result looks like this: <p> m00, m10<br> m01, m11<br>
Set the two columns of this matrix to the supplied vectors, respectively.
Set the matrix element at the given column and row to the specified value.
Set the column at the given <code>column</code> index, starting with <code>0</code>.
Set the column at the given <code>column</code> index, starting with <code>0</code>.
Set the row at the given <code>row</code> index, starting with <code>0</code>.
Set the row at the given <code>row</code> index, starting with <code>0</code>.
Set the value of the matrix element at column 0 and row 0.
Set the value of the matrix element at column 0 and row 1.
Set the value of the matrix element at column 1 and row 0.
Set the value of the matrix element at column 1 and row 1.
Component-wise subtract <code>subtrahend</code> from <code>this</code>.
Exchange the values of <code>this</code> matrix with the given <code>other</code> matrix.
Transpose this matrix.
Set all values within this matrix to zero.
Contains the definition of a 2x2 matrix of doubles, and associated functions to transform it. The matrix is column-major to match OpenGL's interpretation, and it looks like this: <p> m00 m10<br> m01 m11<br>
@author Joseph Burton