mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Update VMobject.is_smooth
This commit is contained in:
parent
d5575cf1ef
commit
eda7f81fb9
1 changed files with 3 additions and 3 deletions
|
@ -654,9 +654,9 @@ class VMobject(Mobject):
|
|||
self.make_smooth(approx=approx)
|
||||
return self
|
||||
|
||||
def is_smooth(self) -> bool:
|
||||
dots = np.cos(self.get_joint_angles()[0::2])
|
||||
return bool((dots > 1 - 1e-3).all())
|
||||
def is_smooth(self, angle_tol=1 * DEGREES) -> bool:
|
||||
angles = np.abs(self.get_joint_angles()[0::2])
|
||||
return (angles < angle_tol).all()
|
||||
|
||||
def change_anchor_mode(self, mode: str) -> Self:
|
||||
assert mode in ("jagged", "approx_smooth", "true_smooth")
|
||||
|
|
Loading…
Add table
Reference in a new issue