summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/raymath.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raymath.h b/src/raymath.h
index 48846a7a..399c2f6c 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -281,9 +281,9 @@ RMAPI float Vector2Distance(Vector2 v1, Vector2 v2)
// Calculate angle from two vectors in X-axis
RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
{
- float result = atan2f(v2.y - v1.y, v2.x - v1.x)*(180.0f/PI);
+ float result = atan2f(v2.y - v1.y, v2.x - v1.x);
- if (result < 0) result += 360.0f;
+ if (result < 0) result += 2 * PI;
return result;
}