画面に3つのポイントがあります。
a = a point which is (c.x, 0) makes a line pointing straight up
b = a user input touch, can be anywhere on the screen
c = a moving object
       a
_______.________
|      |       |
|      |       | 
|   b  |       |
|  .   |       |
|   \  |       |
|    \ |       | 
|     \|       |
|      | c     |
|______._______|ベクトルが見えるように線を引いてあります。
aとbの間の角度を取得できるようにしたい。私はこれを試しましたが、うまくいきません、誰かが私が間違っていることを知っていますか?:
//v1 moving object
float boxX = this.mScene.getLastChild().getX(); 
float boxY = this.mScene.getLastChild().getY();
//v2 user touch
float touchX = pSceneTouchEvent.getX();
float touchY = pSceneTouchEvent.getY();     
//v3 top of screen
float topX = boxX;
final float topY = 0;
float dotProd = (touchX * topX) + (touchY * topY);
float sqrtBox = (touchX * touchX) + (touchY * touchY);
float sqrtTouch = (topX * topX) + (topY * topY);
double totalSqrt = sqrtBox * sqrtTouch;
double theta = Math.acos(dotProd / Math.sqrt(totalSqrt));私が通常得る答えは0と1の間です。角度を度単位で取得するようにこれを修正するにはどうすればよいですか?