在Android中计算旋转角度(以度为单位)?

时间:2014-01-29 14:07:31

标签: android rotation angle

我想计算起点和旋转后位置之间的角度。在这个例子中,90度。设备在板上并顺时针旋转。设备不移动,只有电路板旋转。我该如何计算角度?图像展示了我的意思。角度可以在0到360度之间。如果您有任何疑问,请咨询我。enter image description here

1 个答案:

答案 0 :(得分:1)

不确定,但您应该查看此页面:http://developer.android.com/reference/android/hardware/SensorEvent.html#values

有一堆传感器,我认为陀螺仪可以解决问题。

相关问题