Update documentation for Vector2Angle

This commit is contained in:
Jonathan Akaba 2024-11-29 16:39:38 -08:00 committed by GitHub
parent 58fe34d9cc
commit 2539db1090
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -328,8 +328,9 @@ RMAPI float Vector2DistanceSqr(Vector2 v1, Vector2 v2)
return result; return result;
} }
// Calculate angle between two vectors // Calculate the signed angle from v1 to v2, relative to the origin (0, 0).
// NOTE: Angle is calculated from origin point (0, 0) // NOTE: In Raylib's 2D coordinate system (positive X right, positive Y down),
// positive angles appear clockwise, and negative angles appear counterclockwise.
RMAPI float Vector2Angle(Vector2 v1, Vector2 v2) RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
{ {
float result = 0.0f; float result = 0.0f;