mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-13 14:58:15 +00:00
Clean trailing spaces
This commit is contained in:
@@ -311,7 +311,7 @@ RMAPI float Vector2DistanceSqr(Vector2 v1, Vector2 v2)
|
||||
RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
|
||||
{
|
||||
float result = atan2f(v2.y - v1.y, v2.x - v1.x);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -321,14 +321,14 @@ RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
|
||||
RMAPI float Vector2LineAngle(Vector2 start, Vector2 end)
|
||||
{
|
||||
float result = 0.0f;
|
||||
|
||||
|
||||
float dot = start.x*end.x + start.y*end.y; // Dot product
|
||||
|
||||
float dotClamp = (dot < -1.0f)? -1.0f : dot; // Clamp
|
||||
if (dotClamp > 1.0f) dotClamp = 1.0f;
|
||||
|
||||
result = acosf(dotClamp);
|
||||
|
||||
|
||||
// Alternative implementation, more costly
|
||||
//float v1Length = sqrtf((start.x*start.x) + (start.y*start.y));
|
||||
//float v2Length = sqrtf((end.x*end.x) + (end.y*end.y));
|
||||
|
Reference in New Issue
Block a user