diff options
| author | Ray <[email protected]> | 2022-12-14 13:00:29 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-12-14 13:00:29 +0100 |
| commit | c2b56c583aa94ed6afeb501acc502534e6d36920 (patch) | |
| tree | 48b60a41db284295411b9fee00ddfe372672325f /src | |
| parent | 619331f4a7e146a122e45214f40c32bdce25c650 (diff) | |
| parent | 3419aef6778d5b1d9ed61e6d63d11c44f29ef8e1 (diff) | |
| download | raylib-c2b56c583aa94ed6afeb501acc502534e6d36920.tar.gz raylib-c2b56c583aa94ed6afeb501acc502534e6d36920.zip | |
Merge branch 'master' of https://github.com/raysan5/raylib
Diffstat (limited to 'src')
| -rw-r--r-- | src/raymath.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/raymath.h b/src/raymath.h index fbe4cead..34db2d88 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -309,7 +309,7 @@ RMAPI float Vector2DistanceSqr(Vector2 v1, Vector2 v2) // Calculate angle from two vectors RMAPI float Vector2Angle(Vector2 v1, Vector2 v2) { - float result = atan2f(v2.y, v2.x) - atan2f(v1.y, v1.x); + float result = -acos(v1.x*v2.x + v1.y*v2.y); return result; } |
