3d camera has unintended roll
问题 I've been working on a 3d camera in opengl using C++. When I look around with the camera, sometimes there will be unexpected roll in the camera, especially when I am rotating the camera in circles. I suspect this is a floating point error, but I don't know how to detect it. Here is the camera class: #ifndef CAMERA_H #define CAMERA_H #include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/transform.hpp> #include <glm/gtc