diff options
author | emersion <contact@emersion.fr> | 2018-03-18 09:25:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-18 09:25:33 +0100 |
commit | bfc9b13dcd19d89c619281b4a7ad66c08116062c (patch) | |
tree | 97ac312c45a90ec9d15870faaafbc674436d407c /rootston/cursor.c | |
parent | 1956d3cedb533fb44a7f6a446afe84572838ca39 (diff) | |
parent | a491f780b892b60aa65e17dc5dcb1752a2b78ee7 (diff) |
Merge pull request #730 from martinetd/matrix_rotate
Rootston: fix rotation heading (was: wlr_matrix: fix matrix_rotate)
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r-- | rootston/cursor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index aa94daeb..52439dff 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -200,7 +200,7 @@ static void roots_cursor_update_position(struct roots_cursor *cursor, uy = cursor->offs_y - oy; int vx = cursor->cursor->x - ox, vy = cursor->cursor->y - oy; - float angle = atan2(vx*uy - vy*ux, vx*ux + vy*uy); + float angle = atan2(ux*vy - uy*vx, vx*ux + vy*uy); int steps = 12; angle = round(angle/M_PI*steps) / (steps/M_PI); view_rotate(view, cursor->view_rotation + angle); |