Matrix
Represents a 3x3 transformation matrix in the following form:
a c e
( b d f )
0 0 1
Name | Type | Default | Description |
---|---|---|---|
a |
|
The | |
b |
|
The | |
c |
|
The | |
d |
|
The | |
e |
|
The e (1, 3) member of the matrix. | |
f |
|
The |
Constructors
Matrix
(a?: number, b?: number, c?: number, d?: number, e?: number, f?: number)
Creates a transformation matrix with the specified parameters.
Parameters
a?
number
The `a (1, 1)` member of the matrix.
b?
number
The `b (2, 1)` member of the matrix.
c?
number
The `c (1, 2)` member of the matrix.
d?
number
The `d (2, 2)` member of the matrix.
e?
number
The `e (1, 3)` member of the matrix.
f?
number
The `f (2, 3)` member of the matrix.
Methods
clone | ||||
---|---|---|---|---|
Creates a new instance with the same element values. | ||||
|
equals | ||||||
---|---|---|---|---|---|---|
Compares this matrix with another instance. | ||||||
| ||||||
|
multiplyCopy | ||||||
---|---|---|---|---|---|---|
Multiplies the matrix by another one and returns the result as a new instance. The current instance elements are not altered. | ||||||
| ||||||
|
rotate | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a transformation matrix for rotation with the specified parameters. | ||||||||||||
| ||||||||||||
|
round | ||||||
---|---|---|---|---|---|---|
Rounds the matrix elements to the specified number of fractional digits. | ||||||
| ||||||
|
scale | |||||||||
---|---|---|---|---|---|---|---|---|---|
Creates a transformation matrix for the scale with the specified parameters. | |||||||||
| |||||||||
|
toArray | ||||||
---|---|---|---|---|---|---|
Returns the matrix elements as an | ||||||
| ||||||
|
toString | |||||||||
---|---|---|---|---|---|---|---|---|---|
Formats the matrix elements as a string. | |||||||||
| |||||||||
|
translate | |||||||||
---|---|---|---|---|---|---|---|---|---|
Creates a transformation matrix for the translation with the specified parameters. | |||||||||
| |||||||||
|
unit | ||||
---|---|---|---|---|
Returns the unit (identity) transformation matrix. | ||||
|