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
You have to use the difference in x and y inside of the Atan2 method:
Math.Atan2(b.Y - a.Y,b.X - a.X);
Also, I believe this will give you the angle from 0 to the hypotenuse of the triangle you've provided (not entirely sure).
0
I'd suggest trying Math.PI - angle.
Math.PI - angle