28
28
property real smoothing: 0.03
29
29
// Angle of acceleration vector in X-Y plane
34
36
if (newTheta > 90 && theta < -90)
36
38
else if (theta > 90 && newTheta < -90)
38
40
theta = smoothing * newTheta + (1 - smoothing) * theta
44
50
rotation: 90 - accel.theta
46
52
height: Math.sqrt((parent.height*parent.height) + (parent.width*parent.width))