aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-12-30 12:31:44 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-01-04 06:57:26 +0000
commit63a03f6772b8c008c3b7e6d17e484f585244a5e7 (patch)
tree1f95226b31d6609573a2f104a7c020a4fbc303d6 /tests/manual
parent9b2b06fd7bf07e1012b47798f38ba881e693436f (diff)
mpta-crosshairs manual test: correct the velocity vector rotation
acos cannot return any possible angle, but atan2 can. Change-Id: Ic277bc1d3616900775b6076dce6b05bdf3c35da3 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/touch/mpta-crosshairs.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/manual/touch/mpta-crosshairs.qml b/tests/manual/touch/mpta-crosshairs.qml
index 8b71e4fdc3..a55dfc7799 100644
--- a/tests/manual/touch/mpta-crosshairs.qml
+++ b/tests/manual/touch/mpta-crosshairs.qml
@@ -98,7 +98,8 @@ Rectangle {
height: 1
x: touchPoint.x
y: touchPoint.y
- rotation: width > 0 ? Math.acos(touchPoint.velocity.x / width) : 0
+ rotation: width > 0 ? Math.atan2(touchPoint.velocity.y, touchPoint.velocity.x) * 180 / Math.PI : 0
+ Behavior on rotation { SmoothedAnimation { duration: 20 } }
transformOrigin: Item.BottomLeft
}