diff options
| author | raysan5 <raysan5@gmail.com> | 2018-04-02 15:16:45 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2018-04-02 15:16:45 +0200 |
| commit | 375adf86a61be8f3b23c253672dfd3c8df805784 (patch) | |
| tree | 5127c3b2cd575993859b721d53db5004f3d5376d /src/core.c | |
| parent | 6985953e3d620019721c2286d05858614cf9f9c6 (diff) | |
| download | raylib-375adf86a61be8f3b23c253672dfd3c8df805784.tar.gz raylib-375adf86a61be8f3b23c253672dfd3c8df805784.zip | |
Review math usage to reduce temp variables
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1061,8 +1061,7 @@ Ray GetMouseRay(Vector2 mousePosition, Camera camera) Vector3 cameraPlanePointerPos = rlUnproject((Vector3){ deviceCoords.x, deviceCoords.y, -1.0f }, matProj, matView); // Calculate normalized direction vector - Vector3 direction = Vector3Subtract(farPoint, nearPoint); - direction = Vector3Normalize(direction); + Vector3 direction = Vector3Normalize(Vector3Subtract(farPoint, nearPoint)); if(camera.type == CAMERA_PERSPECTIVE) { |
