diff --git a/src/mode/ModeRotate.cpp b/src/mode/ModeRotate.cpp index 90c2b31..c77f6c8 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" @@ -13,6 +14,8 @@ SModeResult CModeRotate::update(Vector2D pos) { auto length = g_pShapeRuleHandler->getIntOr(CONFIG_ROTATE_LENGTH, **PLENGTH); auto offset = g_pShapeRuleHandler->getFloatOr(CONFIG_ROTATE_OFFSET, **POFFSET); + Debug::log(LOG, "[dynamic-cursors] rotate: pos.x = {}, pos.y = {}", pos.x, pos.y); + // translate to origin end.x -= pos.x; end.y -= pos.y; @@ -32,6 +35,8 @@ SModeResult CModeRotate::update(Vector2D pos) { angle += PI; angle += offset * ((2 * PI) / 360); // convert to radiants + Debug::log(LOG, "[dynamic-cursors] this is it: angle = {}, end.x = {}, end.y = {}, offset = {}", angle, end.x, end.y, offset); + // translate back end.x += pos.x; end.y += pos.y;