diff options
| author | Ray <[email protected]> | 2018-03-16 13:47:01 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2018-03-16 13:47:01 +0100 |
| commit | 61e0e4b4f37cc66135445bc87af7c92399fa69ee (patch) | |
| tree | 73d5b551497d345a5f2696aa33a21a7ed25c583a /src/core.c | |
| parent | 9318dc98ce647acd9a718243555996618e95b959 (diff) | |
| download | raylib-61e0e4b4f37cc66135445bc87af7c92399fa69ee.tar.gz raylib-61e0e4b4f37cc66135445bc87af7c92399fa69ee.zip | |
Complete review of raymath for API consistency
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -432,7 +432,7 @@ static void *GamepadThread(void *arg); // Mouse reading thread // NOTE: data parameter could be used to pass any kind of required data to the initialization void InitWindow(int width, int height, void *data) { - TraceLog(LOG_INFO, "Initializing raylib (v1.9.5-dev)"); + TraceLog(LOG_INFO, "Initializing raylib (v1.9.6-dev)"); #if defined(PLATFORM_DESKTOP) windowTitle = (char *)data; @@ -503,7 +503,7 @@ void InitWindow(int width, int height, void *data) // NOTE: data parameter could be used to pass any kind of required data to the initialization void InitWindow(int width, int height, void *data) { - TraceLog(LOG_INFO, "Initializing raylib (v1.9.5-dev)"); + TraceLog(LOG_INFO, "Initializing raylib (v1.9.6-dev)"); screenWidth = width; screenHeight = height; @@ -1025,7 +1025,7 @@ Ray GetMouseRay(Vector2 mousePosition, Camera camera) // Calculate normalized direction vector Vector3 direction = Vector3Subtract(farPoint, nearPoint); - Vector3Normalize(&direction); + direction = Vector3Normalize(direction); // Apply calculated vectors to ray ray.position = camera.position; @@ -1047,10 +1047,10 @@ Vector2 GetWorldToScreen(Vector3 position, Camera camera) Quaternion worldPos = { position.x, position.y, position.z, 1.0f }; // Transform world position to view - QuaternionTransform(&worldPos, matView); + worldPos = QuaternionTransform(worldPos, matView); // Transform result to projection (clip space position) - QuaternionTransform(&worldPos, matProj); + worldPos = QuaternionTransform(worldPos, matProj); // Calculate normalized device coordinates (inverted y) Vector3 ndcPos = { worldPos.x/worldPos.w, -worldPos.y/worldPos.w, worldPos.z/worldPos.w }; |
