Creates a 3x3 matrix with the given arguments in row-major order.
Sets the values of this matrix from the provided array or array-like.
the source array or array-like.
Optionaloffset: number(optional) offset into the array-like. Default is 0.
Inverts this matrix in place.
Sets this matrix as a 2D rotational transformation by theta radians. The resulting matrix will be:
cos(θ) -sin(θ) 0
sin(θ) cos(θ) 0
0 0 1
Rotation angle in radians. Positive values rotate counterclockwise.
Sets this matrix as a 2D scale transform:
x, 0, 0,
0, y, 0,
0, 0, 1
the amount to scale in the X axis.
the amount to scale in the Y axis.
Sets this matrix as a 2D translation transform:
1, 0, x,
0, 1, y,
0, 0, 1
the amount to translate.
Sets this matrix as a 2D translation transform:
1, 0, x,
0, 1, y,
0, 0, 1
the amount to translate in the X axis.
the amount to translate in the Y axis.
Writes the elements of this matrix to an array in column-major format.
Writes the elements of this matrix to an array in column-major format.
array to store the resulting vector in. If not given a new array will be created.
Optionaloffset: number(optional) offset in the array at which to put the result.
Transposes this matrix in place.
Transposes this matrix into the supplied array r, and returns itself.
Creates an identity matrix.