From 0b0dbcb5d8f41b4aad69017e6808076fea0fea75 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 21 Feb 2020 12:01:39 -0800 Subject: [PATCH] Replace np.tan with math.tan...because why not --- manimlib/utils/paths.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manimlib/utils/paths.py b/manimlib/utils/paths.py index dd46a626..b13af223 100644 --- a/manimlib/utils/paths.py +++ b/manimlib/utils/paths.py @@ -1,4 +1,5 @@ import numpy as np +import math from manimlib.constants import OUT from manimlib.utils.bezier import interpolate @@ -33,7 +34,7 @@ def path_along_arc(arc_angle, axis=OUT): vects = end_points - start_points centers = start_points + 0.5 * vects if arc_angle != np.pi: - centers += np.cross(unit_axis, vects / 2.0) / np.tan(arc_angle / 2) + centers += np.cross(unit_axis, vects / 2.0) / math.tan(arc_angle / 2) rot_matrix_T = rotation_matrix_transpose(alpha * arc_angle, unit_axis) return centers + np.dot(start_points - centers, rot_matrix_T)