1
0
mirror of https://github.com/3b1b/manim.git synced 2022-02-13 01:39:48 +03:00

some clean

This commit is contained in:
TonyCrane
2022-01-26 11:00:57 +08:00
parent 07f84e2676
commit 6c8dd14adc

View File

@@ -25,16 +25,6 @@ from manimlib.utils.simple_functions import clip
from manimlib.logger import log
def string_to_numbers(num_string):
num_string = num_string.replace("-", ",-")
num_string = num_string.replace("e,-", "e-")
return [
float(s)
for s in re.split("[ ,]", num_string)
if s != ""
]
class SVGMobject(VMobject):
CONFIG = {
"should_center": True,
@@ -118,11 +108,6 @@ class SVGMobject(VMobject):
return result
def g_to_mobjects(self, g_element):
mob = VGroup(*self.get_mobjects_from(g_element))
self.handle_transforms(g_element, mob)
return mob.submobjects
def path_string_to_mobject(self, path_string):
return VMobjectFromSVGPathstring(
path_string,
@@ -430,7 +415,6 @@ class VMobjectFromSVGPathstring(VMobject):
func(*args)
relative_point = self.get_last_point()
def add_elliptical_arc_to(self, rx, ry, x_axis_rotation, large_arc_flag, sweep_flag, point):
def close_to_zero(a, threshold=1e-5):
return abs(a) < threshold