Im trying to find out the angle (in degrees) between two 2D vectors. I know I need to use trig but I\'m not too good with it. This is what I\'m trying to work out (the Y axi
Aha! Turns out I just needed to flip my angle and use atan2. This is my final code:
private float calcAngle(float x, float y, float x1, float y1)
{
float _angle = (float)Math.toDegrees(Math.atan2(x1-x, y-y1));
return _angle;
}
Thanks everyone for helping me figure this out and also for helping me to understand what I'm actually doing! :)