Browse Source

Reviewed typo

Ray 3 years ago
parent
commit
20f4d8c147
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/raymath.h

+ 4 - 3
src/raymath.h

@@ -99,8 +99,7 @@
 // Types and Structures Definition
 // Types and Structures Definition
 //----------------------------------------------------------------------------------
 //----------------------------------------------------------------------------------
 #if !defined(RL_VECTOR2_TYPE)
 #if !defined(RL_VECTOR2_TYPE)
-// 
-type
+// Vector2 type
 typedef struct Vector2 {
 typedef struct Vector2 {
     float x;
     float x;
     float y;
     float y;
@@ -534,10 +533,12 @@ RMAPI float Vector3Distance(Vector3 v1, Vector3 v2)
 // Calculate angle between two vectors
 // Calculate angle between two vectors
 RMAPI float Vector3Angle(Vector3 v1, Vector3 v2)
 RMAPI float Vector3Angle(Vector3 v1, Vector3 v2)
 {
 {
+    float result = 0.0f;
+    
     Vector3 cross = { v1.y*v2.z - v1.z*v2.y, v1.z*v2.x - v1.x*v2.z, v1.x*v2.y - v1.y*v2.x };
     Vector3 cross = { v1.y*v2.z - v1.z*v2.y, v1.z*v2.x - v1.x*v2.z, v1.x*v2.y - v1.y*v2.x };
     float len = sqrtf(cross.x*cross.x + cross.y*cross.y + cross.z*cross.z);
     float len = sqrtf(cross.x*cross.x + cross.y*cross.y + cross.z*cross.z);
     float dot = (v1.x*v2.x + v1.y*v2.y + v1.z*v2.z);
     float dot = (v1.x*v2.x + v1.y*v2.y + v1.z*v2.z);
-    float result = atan2f(len, dot);
+    result = atan2f(len, dot);
     
     
     return result;
     return result;
 }
 }