Use Base::toRadians() instead of manually converting

This commit is contained in:
Benjamin Nauck
2025-04-09 09:14:54 +02:00
parent 1f8c8043fc
commit 21fbf8e539
43 changed files with 129 additions and 106 deletions

View File

@@ -29,6 +29,7 @@
#include <QWidget>
#include <Base/Exception.h>
#include <Base/Tools.h>
#include "SoTouchEvents.h"
@@ -88,8 +89,8 @@ SoGesturePinchEvent::SoGesturePinchEvent(QPinchGesture* qpinch, QWidget *widget)
deltaZoom = qpinch->scaleFactor();
totalZoom = qpinch->totalScaleFactor();
deltaAngle = -unbranchAngle((qpinch->rotationAngle()-qpinch->lastRotationAngle()) / 180.0 * std::numbers::pi);
totalAngle = -qpinch->totalRotationAngle() / 180 * std::numbers::pi;
deltaAngle = -unbranchAngle(Base::toRadians(qpinch->rotationAngle()-qpinch->lastRotationAngle()));
totalAngle = Base::toRadians(-qpinch->totalRotationAngle());
state = SbGestureState(qpinch->state());