Fix a typo in rotation.y update

+ remove the doubled rotation code at call site.
This commit is contained in:
skal 2023-03-04 09:29:39 -08:00 committed by GitHub
parent ab899ff472
commit 06bd9b8caa
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)
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;
if (cubes[1].rotation.y > 360.0f)
cubes[1].rotation.y -= 360.0f;
}
}
@ -324,12 +324,6 @@ public:
return;
draw();
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();
}
if (camera.updated) {