|
|
@ -124,7 +124,7 @@ RMDEF Vector2 Vector2Zero(void); // Vector with c |
|
|
|
RMDEF Vector2 Vector2One(void); // Vector with components value 1.0f |
|
|
|
RMDEF Vector2 Vector2Add(Vector2 v1, Vector2 v2); // Add two vectors (v1 + v2) |
|
|
|
RMDEF Vector2 Vector2Subtract(Vector2 v1, Vector2 v2); // Subtract two vectors (v1 - v2) |
|
|
|
RMDEF float Vector2Lenght(Vector2 v); // Calculate vector lenght |
|
|
|
RMDEF float Vector2Length(Vector2 v); // Calculate vector length |
|
|
|
RMDEF float Vector2DotProduct(Vector2 v1, Vector2 v2); // Calculate two vectors dot product |
|
|
|
RMDEF float Vector2Distance(Vector2 v1, Vector2 v2); // Calculate distance between two vectors |
|
|
|
RMDEF float Vector2Angle(Vector2 v1, Vector2 v2); // Calculate angle between two vectors in X-axis |
|
|
@ -142,7 +142,7 @@ RMDEF Vector3 VectorAdd(Vector3 v1, Vector3 v2); // Add two vecto |
|
|
|
RMDEF Vector3 VectorSubtract(Vector3 v1, Vector3 v2); // Substract two vectors |
|
|
|
RMDEF Vector3 VectorCrossProduct(Vector3 v1, Vector3 v2); // Calculate two vectors cross product |
|
|
|
RMDEF Vector3 VectorPerpendicular(Vector3 v); // Calculate one vector perpendicular vector |
|
|
|
RMDEF float VectorLength(const Vector3 v); // Calculate vector lenght |
|
|
|
RMDEF float VectorLength(const Vector3 v); // Calculate vector length |
|
|
|
RMDEF float VectorDotProduct(Vector3 v1, Vector3 v2); // Calculate two vectors dot product |
|
|
|
RMDEF float VectorDistance(Vector3 v1, Vector3 v2); // Calculate distance between two points |
|
|
|
RMDEF void VectorScale(Vector3 *v, float scale); // Scale provided vector |
|
|
@ -236,8 +236,8 @@ RMDEF Vector2 Vector2Subtract(Vector2 v1, Vector2 v2) |
|
|
|
return (Vector2){ v1.x - v2.x, v1.y - v2.y }; |
|
|
|
} |
|
|
|
|
|
|
|
// Calculate vector lenght |
|
|
|
RMDEF float Vector2Lenght(Vector2 v) |
|
|
|
// Calculate vector length |
|
|
|
RMDEF float Vector2Length(Vector2 v) |
|
|
|
{ |
|
|
|
return sqrtf((v.x*v.x) + (v.y*v.y)); |
|
|
|
} |
|
|
@ -287,7 +287,7 @@ RMDEF void Vector2Divide(Vector2 *v, float div) |
|
|
|
// Normalize provided vector |
|
|
|
RMDEF void Vector2Normalize(Vector2 *v) |
|
|
|
{ |
|
|
|
Vector2Divide(v, Vector2Lenght(*v)); |
|
|
|
Vector2Divide(v, Vector2Length(*v)); |
|
|
|
} |
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------- |
|
|
@ -348,7 +348,7 @@ RMDEF Vector3 VectorPerpendicular(Vector3 v) |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
// Calculate vector lenght |
|
|
|
// Calculate vector length |
|
|
|
RMDEF float VectorLength(const Vector3 v) |
|
|
|
{ |
|
|
|
return sqrtf(v.x*v.x + v.y*v.y + v.z*v.z); |
|
|
|