diff options
| author | DarkElvenAngel <[email protected]> | 2019-06-10 16:12:06 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-06-10 16:12:06 -0400 |
| commit | d7f4be071579e6f00974c0940f021272f22fbc54 (patch) | |
| tree | 6ee389e6617c494d272e9bc82415fbc3618e7a28 /src/physac.h | |
| parent | 8a21830b77eaa76ffe0c31df5f96aecd6bd2eecc (diff) | |
| parent | baf7d7d19ad8d6bfbfc201169e4ed4f49a9576a6 (diff) | |
| download | raylib-d7f4be071579e6f00974c0940f021272f22fbc54.tar.gz raylib-d7f4be071579e6f00974c0940f021272f22fbc54.zip | |
Merge pull request #1 from raysan5/master
Update
Diffstat (limited to 'src/physac.h')
| -rw-r--r-- | src/physac.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/physac.h b/src/physac.h index 038361a4..42cb0198 100644 --- a/src/physac.h +++ b/src/physac.h @@ -43,7 +43,7 @@ * NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread) * * Use the following code to compile: -* gcc -o $(NAME_PART).exe $(FILE_NAME) -s -static -lraylib -lpthread -lopengl32 -lgdi32 -std=c99 +* gcc -o $(NAME_PART).exe $(FILE_NAME) -s -static -lraylib -lpthread -lopengl32 -lgdi32 -lwinmm -std=c99 * * VERY THANKS TO: * Ramon Santamaria (github: @raysan5) @@ -323,8 +323,6 @@ static void InitTimer(void); static uint64_t GetTimeCount(void); // Get hi-res MONOTONIC time measure in mseconds static double GetCurrentTime(void); // Get current time measure in milliseconds -static int GetRandomNumber(int min, int max); // Returns a random number between min and max (both included) - // Math functions static Vector2 MathCross(float value, Vector2 vector); // Returns the cross product of a vector and a value static float MathCrossVector2(Vector2 v1, Vector2 v2); // Returns the cross product of two vectors @@ -1771,7 +1769,7 @@ static float FindAxisLeastPenetration(int *faceIndex, PhysicsShape shapeA, Physi int bestIndex = 0; PolygonData dataA = shapeA.vertexData; - PolygonData dataB = shapeB.vertexData; + //PolygonData dataB = shapeB.vertexData; for (int i = 0; i < dataA.vertexCount; i++) { @@ -1921,7 +1919,7 @@ static void InitTimer(void) // Get hi-res MONOTONIC time measure in seconds static uint64_t GetTimeCount(void) { - uint64_t value; + uint64_t value = 0; #if defined(_WIN32) QueryPerformanceCounter((unsigned long long int *) &value); @@ -1946,19 +1944,6 @@ static double GetCurrentTime(void) return (double)(GetTimeCount() - baseTime)/frequency*1000; } -// Returns a random number between min and max (both included) -static int GetRandomNumber(int min, int max) -{ - if (min > max) - { - int tmp = max; - max = min; - min = tmp; - } - - return (rand()%(abs(max - min) + 1) + min); -} - // Returns the cross product of a vector and a value static inline Vector2 MathCross(float value, Vector2 vector) { |
