diff --git a/src/mode/ModeRotate.cpp b/src/mode/ModeRotate.cpp index fc26983..2e65482 100644 --- a/src/mode/ModeRotate.cpp +++ b/src/mode/ModeRotate.cpp @@ -1,4 +1,5 @@ #include "../config/config.hpp" +#include "src/debug/Log.hpp" #include "src/macros.hpp" #include #include "ModeRotate.hpp" @@ -34,6 +35,9 @@ SModeResult CModeRotate::update(Vector2D pos) { angle += PI; 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 end.x += pos.x; end.y += pos.y;