In get_euler_angles, add edge case for gimbal lock on the low side

This commit is contained in:
Grant Sanderson 2024-08-07 14:11:10 -05:00
parent 0a43a3ff9a
commit bc91e91634

View file

@ -74,6 +74,9 @@ class CameraFrame(Mobject):
if np.isclose(angles[1], 0, atol=1e-2):
angles[0] = angles[0] + angles[2]
angles[2] = 0
if np.isclose(angles[1], PI, atol=1e-2):
angles[0] = angles[0] - angles[2]
angles[2] = 0
return angles
def get_theta(self):