mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
rootston rotation: change view->rotation sign
The convetion with wlr_matrix changed and it's a good time to remove all these pesky minus signs
This commit is contained in:
parent
1956d3cedb
commit
a491f780b8
3 changed files with 11 additions and 11 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue