From aba3739c1354cac4ef302d9b43c3fc5e9699b373 Mon Sep 17 00:00:00 2001 From: Wilhem Barbier Date: Thu, 29 Jun 2017 10:29:01 +0200 Subject: [PATCH 1/2] Fix some typos in raymath.h --- src/raymath.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/raymath.h b/src/raymath.h index 499f9eec..6961845c 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -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 Vector2Lenght(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)); } @@ -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); From 056a494baf3b4c450e734967c033919facfdec5c Mon Sep 17 00:00:00 2001 From: Wilhem Barbier Date: Thu, 29 Jun 2017 10:36:58 +0200 Subject: [PATCH 2/2] Fix some other typos --- docs/cheatsheet/raylib_models.c | 6 +++--- examples/others/standard_lighting.c | 4 ++-- src/raymath.h | 4 ++-- src/textures.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/cheatsheet/raylib_models.c b/docs/cheatsheet/raylib_models.c index 909d7bee..d7540136 100644 --- a/docs/cheatsheet/raylib_models.c +++ b/docs/cheatsheet/raylib_models.c @@ -3,11 +3,11 @@ void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space - void DrawCube(Vector3 position, float width, float height, float lenght, Color color); // Draw cube + void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version) - void DrawCubeWires(Vector3 position, float width, float height, float lenght, Color color); // Draw cube wires + void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires void DrawCubeTexture(Texture2D texture, Vector3 position, float width, - float height, float lenght, Color color); // Draw cube textured + float height, float length, Color color); // Draw cube textured void DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires diff --git a/examples/others/standard_lighting.c b/examples/others/standard_lighting.c index 14fda32e..a7f634e2 100644 --- a/examples/others/standard_lighting.c +++ b/examples/others/standard_lighting.c @@ -69,7 +69,7 @@ static void GetShaderLightsLocations(Shader shader); // Get shader locations static void SetShaderLightsValues(Shader shader); // Set shader uniform values for lights // Vector3 math functions -static float VectorLength(const Vector3 v); // Calculate vector lenght +static float VectorLength(const Vector3 v); // Calculate vector length static void VectorNormalize(Vector3 *v); // Normalize provided vector static Vector3 VectorSubtract(Vector3 v1, Vector3 v2); // Substract two vectors @@ -444,7 +444,7 @@ static void SetShaderLightsValues(Shader shader) } } -// Calculate vector lenght +// Calculate vector length float VectorLength(const Vector3 v) { float length; diff --git a/src/raymath.h b/src/raymath.h index 6961845c..c4db0f3f 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -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 length +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 @@ -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)); } //---------------------------------------------------------------------------------- diff --git a/src/textures.c b/src/textures.c index 9b0067cf..5196b1e1 100644 --- a/src/textures.c +++ b/src/textures.c @@ -2397,7 +2397,7 @@ static Image LoadASTC(const char *fileName) unsigned char blockZ; // Block Z dimensions (1 for 2D images) unsigned char width[3]; // Image width in pixels (24bit value) unsigned char height[3]; // Image height in pixels (24bit value) - unsigned char lenght[3]; // Image Z-size (1 for 2D images) + unsigned char length[3]; // Image Z-size (1 for 2D images) } ASTCHeader; Image image;