Created
October 13, 2014 10:11
-
-
Save bholota/2523f3cee02e94083c64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case MotionEvent.ACTION_UP: { | |
for (int a = 0; a < MoveList.size(); a++) { | |
String zxc = MoveList.get(a).toString(); | |
qwe = qwe + zxc + "\n"; | |
} | |
MyActivity.prevtextview.setText("Prev_angle: " + String.valueOf(mPrevAngle)); | |
MyActivity.currtextview.setText("Curr_angle List: " + String.valueOf(qwe)); | |
add_it = how_much_degree_already_rotated; | |
Vector2 start = new Vector2(start_x, start_y); | |
Vector2 stop = new Vector2(x, y); | |
Vector2 center = new Vector2(xc, yc); | |
float direction = ((start.x - center.x) * (stop.y - start.y)) - ((start.y - center.y) * (stop.x - start.x)); | |
if(direction > 0) { | |
Log.e("TAG", "left"); | |
} else if (direction < 0) { | |
Log.e("TAG", "right"); | |
} else { | |
Log.e("TAG", "same direction"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment