We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 445ce51 commit 3419aefCopy full SHA for 3419aef
src/raymath.h
@@ -309,7 +309,7 @@ RMAPI float Vector2DistanceSqr(Vector2 v1, Vector2 v2)
309
// Calculate angle from two vectors
310
RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
311
{
312
- float result = atan2f(v2.y, v2.x) - atan2f(v1.y, v1.x);
+ float result = -acos(v1.x*v2.x + v1.y*v2.y);
313
314
return result;
315
}
0 commit comments