From 375adf86a61be8f3b23c253672dfd3c8df805784 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Mon, 2 Apr 2018 15:16:45 +0200 Subject: Review math usage to reduce temp variables --- src/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core.c') 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) { -- cgit v1.2.3