Shift first - rotate later

This commit is contained in:
Mészáros Gergely 2022-04-20 10:25:01 +02:00
parent a6edd8e5fd
commit 38e708c0ed

View file

@ -64,8 +64,8 @@ window.UISubmap = (function () {
let projection, inverse; let projection, inverse;
if (angle || shiftX || shiftY) { if (angle || shiftX || shiftY) {
projection = app(rot(angle), shift(shiftX, shiftY)); projection = app(shift(shiftX, shiftY), rot(angle));
inverse = app(shift(-shiftX, -shiftY), rot(-angle)); inverse = app(rot(-angle), shift(-shiftX, -shiftY));
} else { } else {
projection = (x, y) => [x, y]; projection = (x, y) => [x, y];
inverse = (x, y) => [x, y]; inverse = (x, y) => [x, y];