Construct new instance of affine transformation matrix
If parameters omitted, construct identity matrix a = 1, d = 1
position(0,0) sx*cos(alpha)
position (0,1) sx*sin(alpha)
position (1,0) -sy*sin(alpha)
position (1,1) sy*cos(alpha)
position (2,0) translation by x
position (2,1) translation by y
Returns true if two matrix are equal parameter by parameter
other matrix
true if equal, false otherwise
Rotate matrix by given angle (in radians) around center of rotation (0,0) in counterclockwise direction.
angle in radians
center of rotation
center of rotation
new matrix as a result of multiplication of the current matrix by the matrix that defines rotation by given angle (in radians) around center of rotation (centerX,centerY) in counterclockwise direction
Transform vector [x,y] using transformation matrix.
Vector [x,y] is an abstract array[2] of numbers and not a FlattenJS object
The result is also an abstract vector [x',y'] = A * [x,y]:
[x' [ ax + by + tx
y' = cx + dy + ty
1] 1 ]
array[2] of numbers
transformation result - array[2] of numbers
Class representing an affine transformation 3x3 matrix:
[ a c tx A = b d ty 0 0 1 ]