The problem is this:
Both calculations give you the same result!
float a = Vector2.Angle(Vector2.up, new Vector2(5f, 2f)); //a = 68.19859
float b = Vector2.Angle(Vector2.up, new Vector2(-5f, 2f)); //b = 68.19859
So how can you get the angle of a vector between 0 and 360 degrees?
double radians = Mathf.Atan2((y2-y1), (x2-x1));
double degrees = radians * 180f / Mathf.PI;
if(degrees < 0) degrees += 360; // degrees are now between 0 and 360
float angle = (float) degrees; //cast to float if you need to
Just use the correct orientation for (x1, y1) and you’re good…