Review math usage to reduce temp variables
This commit is contained in:
parent
6985953e3d
commit
375adf86a6
3 changed files with 13 additions and 22 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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue