summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/sensors/accelbubble/accelbubble.qml4
-rw-r--r--examples/sensors/accelbubble/android/AndroidManifest.xml2
-rw-r--r--examples/sensors/maze/android/AndroidManifest.xml2
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/sensors/accelbubble/accelbubble.qml b/examples/sensors/accelbubble/accelbubble.qml
index f26179f..8bd036f 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/examples/sensors/accelbubble/android/AndroidManifest.xml b/examples/sensors/accelbubble/android/AndroidManifest.xml
index f310444..4627978 100644
--- a/examples/sensors/accelbubble/android/AndroidManifest.xml
+++ b/examples/sensors/accelbubble/android/AndroidManifest.xml
@@ -65,7 +65,7 @@
</application>
- <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/>
+ <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
diff --git a/examples/sensors/maze/android/AndroidManifest.xml b/examples/sensors/maze/android/AndroidManifest.xml
index de787fa..bfb126a 100644
--- a/examples/sensors/maze/android/AndroidManifest.xml
+++ b/examples/sensors/maze/android/AndroidManifest.xml
@@ -42,7 +42,7 @@
<!-- Background running -->
</activity>
</application>
- <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
+ <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.