mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 16:13:21 +02:00
test: not again, but fix
This commit is contained in:
parent
e0f959a0f4
commit
bdecb4f964
1 changed files with 4 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include "../config/config.hpp"
|
#include "../config/config.hpp"
|
||||||
|
#include "src/debug/Log.hpp"
|
||||||
#include "src/macros.hpp"
|
#include "src/macros.hpp"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "ModeRotate.hpp"
|
#include "ModeRotate.hpp"
|
||||||
|
@ -34,6 +35,9 @@ SModeResult CModeRotate::update(Vector2D pos) {
|
||||||
angle += PI;
|
angle += PI;
|
||||||
angle += offset * ((2 * PI) / 360); // convert to radiants
|
angle += offset * ((2 * PI) / 360); // convert to radiants
|
||||||
|
|
||||||
|
Debug::log(LOG, "[dynamic-cursors] this is it: pos.x = {}, pos.y = {}, angle = {}, end.x = {}, end.y = {}, offset = {}", pos.x, pos.y, angle, end.x, end.y, offset);
|
||||||
|
if (end.y == 0) angle = 0; // do not divide by 0 above, leave untransformed in these cases
|
||||||
|
|
||||||
// translate back
|
// translate back
|
||||||
end.x += pos.x;
|
end.x += pos.x;
|
||||||
end.y += pos.y;
|
end.y += pos.y;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue