From ec017bd1ae806b951a9c7c041bb21e665476d7c1 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Thu, 20 Feb 2020 15:51:26 -0800 Subject: [PATCH] Insignificant style edit --- manimlib/utils/space_ops.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manimlib/utils/space_ops.py b/manimlib/utils/space_ops.py index bcad6ee4..f1649c93 100644 --- a/manimlib/utils/space_ops.py +++ b/manimlib/utils/space_ops.py @@ -82,13 +82,13 @@ def thick_diagonal(dim, thickness=2): def rotation_matrix_transpose(angle, axis): if axis[0] == 0 and axis[1] == 0: # axis = [0, 0, z] case is common enough it's worth - # having a shortcut to save operations + # having a shortcut sgn = 1 if axis[2] > 0 else -1 - ca = np.cos(angle) - sa = np.sin(angle) + cos_a = np.cos(angle) + sin_a = np.sin(angle) * sgn return [ - [ca, sgn * sa, 0], - [-sgn * sa, ca, 0], + [cos_a, sin_a, 0], + [-sin_a, cos_a, 0], [0, 0, 1], ] quat = quaternion_from_angle_axis(angle, axis)