Merge pull request #1019 from skal65535/patch-2

Fix a typo in rotation.y update
This commit is contained in:
Sascha Willems 2023-04-07 12:31:17 +02:00 committed by GitHub
commit 0ab683e827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,8 +267,8 @@ public:
if (cubes[0].rotation.x > 360.0f) if (cubes[0].rotation.x > 360.0f)
cubes[0].rotation.x -= 360.0f; cubes[0].rotation.x -= 360.0f;
cubes[1].rotation.y += 2.0f * frameTimer; cubes[1].rotation.y += 2.0f * frameTimer;
if (cubes[1].rotation.x > 360.0f) if (cubes[1].rotation.y > 360.0f)
cubes[1].rotation.x -= 360.0f; cubes[1].rotation.y -= 360.0f;
} }
} }
@ -324,12 +324,6 @@ public:
return; return;
draw(); draw();
if (animate && !paused) { if (animate && !paused) {
cubes[0].rotation.x += 2.5f * frameTimer;
if (cubes[0].rotation.x > 360.0f)
cubes[0].rotation.x -= 360.0f;
cubes[1].rotation.y += 2.0f * frameTimer;
if (cubes[1].rotation.x > 360.0f)
cubes[1].rotation.x -= 360.0f;
updateCubeUniformBuffers(); updateCubeUniformBuffers();
} }
if (camera.updated) { if (camera.updated) {