Skip to content

Commit dfb8d7c

Browse files
committed
matrix was a counter-clockwise matrix instead of a clockwise
1 parent 4e97146 commit dfb8d7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/math/matrix.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default class Matrix {
125125
get rotation () {
126126
if (!this.hasRotation) {
127127
this.hasRotation = true;
128-
this._rotation = Math.atan2(-this._matrix[3], this._matrix[0]);
128+
this._rotation = -Math.atan2(-this._matrix[3], this._matrix[0]);
129129
}
130130

131131
return this._rotation;
@@ -196,8 +196,8 @@ export default class Matrix {
196196
const cos = Math.cos(this._rotation);
197197

198198
this._matrix = [
199-
this._sx * cos, this._sy * sin, this._x,
200-
-this._sx * sin, this._sy * cos, this._y
199+
this._sx * cos, this._sx * -sin, this._x,
200+
this._sy * sin, this._sy * cos, this._y
201201
];
202202
}
203203

0 commit comments

Comments
 (0)