For function mxy()
, gets or sets the element of the matrix at the
position [x, y]
For function mxy()
, gets or sets the element of the matrix at the
position [x, y]
Clones the vector
Returns the determinant for this matrix.
the determinant
Returns the element of the matrix in the position [row, col]
Calculate inverse... I just used Two.js's method here.
Return true if this.elements are within precision equal to other.elements
Sets this matrix to be the identity matrix.
Returns a new identity matrix.
a new identity matrix
Returns a matrix with all ones
a matrix with all ones
Returns a matrix with random floats for each element
a matrix with random elements
Returns the corresponding rotation transformation matrix for the given
radians
.
the rotation amount in radians
the rotation transformation matrix
Returns the corresponding 2D scale transformation matrix for the given scaling factor.
If factor
is a number
, then uses the factor for scaling in the x and
y directions.
If factor
is an array
of length two, then uses the factor[0] as the x
direction and factor[1] as the y-direction.
If factor
is a Vec2
, then uses the factor[0] as the x-direction and
factor[1] as the y-direction.
Returns the corresponding 3D scale transformation matrix given the scaling factor.
If factor is a number, then uses the factor for scaling in the x and y
direction.
If factor is an array of length three, then uses the factor[0] as the x
direction, factor[1] as the y direction, and factor[2] as the z-direction.
If factor is a Vec3
, then uses the factor[0] as the x-direction,
factor[1] as the y-direction, and factor[2] as the z-direction.
the scaling factor
Returns the corresponding 2D translation transformation matrix for the
given translation t
or x
and y
.
If the argument is x
and y
, then it translates in the x-direction x
amount and in the y-direction y
amount.
If t
is an array
of length two, then uses the t[0] as the x-direction
and t[1] as the y-direction.
If t
is a Vec2
, then uses the t[0] as the x-direction and t[1] as the
y-direction.
the translation factor
Returns a matrix with all zeros
a matrix with all zeros
Generated using TypeDoc
For function
cx()
, gets or sets thex
th column of the matrix.