diff options
-rw-r--r-- | examples/sensors/accelbubble/accelbubble.qml | 4 | ||||
-rw-r--r-- | src/sensors/gestures/qsensorgesture.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/sensors/accelbubble/accelbubble.qml b/examples/sensors/accelbubble/accelbubble.qml index f26179ff..8bd036ff 100644 --- a/examples/sensors/accelbubble/accelbubble.qml +++ b/examples/sensors/accelbubble/accelbubble.qml @@ -101,10 +101,10 @@ ApplicationWindow { } function calcPitch(x,y,z) { - return -Math.atan2(y, Math.sqrt(x * x + z * z)) * mainWindow.radians_to_degrees; + return -Math.atan2(y, Math.hypot(x, z)) * mainWindow.radians_to_degrees; } function calcRoll(x,y,z) { - return -Math.atan2(x, Math.sqrt(y * y + z * z)) * mainWindow.radians_to_degrees; + return -Math.atan2(x, Math.hypot(y, z)) * mainWindow.radians_to_degrees; } Image { diff --git a/src/sensors/gestures/qsensorgesture.h b/src/sensors/gestures/qsensorgesture.h index dd95b3bd..de727954 100644 --- a/src/sensors/gestures/qsensorgesture.h +++ b/src/sensors/gestures/qsensorgesture.h @@ -74,6 +74,7 @@ public: private: QSensorGesturePrivate * d_ptr; + // ### fixme: Qt 6: Make public to enable Qt for Python bindings private: // Pretend to be a Q_OBJECT const QMetaObject *metaObject() const override; |