[raymath] Hotfix for Vector2Angle and corresponding example
This commit is contained in:
parent
5061fed120
commit
2957c1555f
|
|
@ -324,15 +324,7 @@ RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
|
|||
float dot = v1.x*v2.x + v1.y*v2.y;
|
||||
float det = v1.x*v2.y - v1.y*v2.x;
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
result = atan2f(det, dot);
|
||||
=======
|
||||
=======
|
||||
>>>>>>> origin
|
||||
// TODO(10/9/2023): Currently angles move clockwise, determine if this is wanted behavior
|
||||
result = -atan2f(det, dot);
|
||||
>>>>>>> b5edafafe17c950722d4c5fd6c705f6aff74a65f
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -344,8 +336,7 @@ RMAPI float Vector2LineAngle(Vector2 start, Vector2 end)
|
|||
{
|
||||
float result = 0.0f;
|
||||
|
||||
// TODO(10/9/2023): Currently angles move clockwise, determine if this is wanted behavior
|
||||
result = -atan2f(end.y - start.y, end.x - start.x);
|
||||
result = atan2f(end.y - start.y, end.x - start.x);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user