aboutsummaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2018-04-02 15:16:45 +0200
committerraysan5 <raysan5@gmail.com>2018-04-02 15:16:45 +0200
commit375adf86a61be8f3b23c253672dfd3c8df805784 (patch)
tree5127c3b2cd575993859b721d53db5004f3d5376d /src/core.c
parent6985953e3d620019721c2286d05858614cf9f9c6 (diff)
downloadraylib-375adf86a61be8f3b23c253672dfd3c8df805784.tar.gz
raylib-375adf86a61be8f3b23c253672dfd3c8df805784.zip
Review math usage to reduce temp variables
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 2171835a..3692845f 100644
--- a/src/core.c
+++ b/src/core.c
@@ -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)
{