I\'m trying to compute the angle between two vectors. I tried this, but it always returns zero:
public double GetAngle(Vector2 a, Vector2 b)
{
double angle = Mat
if you are looking for the "angle between vectors a and b", you want the delta of the angle for vector a and the angle for vector b:
Math.Atan2(b.Y, b.X) - Math.Atan2(a.Y, a.X)
But the diagram doesn't match "angle between vectors". The answer for the diagram is indeed the previous answer given:
Math.Atan2(b.Y - a.Y, b.X - a.X)