mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Replace np.tan with math.tan...because why not
This commit is contained in:
parent
2ca0726cd7
commit
0b0dbcb5d8
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue