summaryrefslogtreecommitdiffhomepage
path: root/src/rlgl.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2018-04-02 15:16:45 +0200
committerraysan5 <[email protected]>2018-04-02 15:16:45 +0200
commit375adf86a61be8f3b23c253672dfd3c8df805784 (patch)
tree5127c3b2cd575993859b721d53db5004f3d5376d /src/rlgl.c
parent6985953e3d620019721c2286d05858614cf9f9c6 (diff)
downloadraylib-375adf86a61be8f3b23c253672dfd3c8df805784.tar.gz
raylib-375adf86a61be8f3b23c253672dfd3c8df805784.zip
Review math usage to reduce temp variables
Diffstat (limited to 'src/rlgl.c')
-rw-r--r--src/rlgl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rlgl.c b/src/rlgl.c
index 8b9f18e8..f25340fa 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -470,8 +470,7 @@ void rlRotatef(float angleDeg, float x, float y, float z)
Matrix matRotation = MatrixIdentity();
Vector3 axis = (Vector3){ x, y, z };
- axis = Vector3Normalize(axis);
- matRotation = MatrixRotate(axis, angleDeg*DEG2RAD);
+ matRotation = MatrixRotate(Vector3Normalize(axis), angleDeg*DEG2RAD);
// NOTE: We transpose matrix with multiplication order
*currentMatrix = MatrixMultiply(matRotation, *currentMatrix);
@@ -1356,7 +1355,7 @@ Vector3 rlUnproject(Vector3 source, Matrix proj, Matrix view)
// Calculate unproject matrix (multiply view patrix by projection matrix) and invert it
Matrix matViewProj = MatrixMultiply(view, proj);
- matViewProj= MatrixInvert(matViewProj);
+ matViewProj = MatrixInvert(matViewProj);
// Create quaternion from source point
Quaternion quat = { source.x, source.y, source.z, 1.0f };