mirror of
https://github.com/3b1b/manim.git
synced 2025-08-03 04:04:36 +08:00
Bug fix for length 0 Dashed line
This commit is contained in:
@ -439,6 +439,9 @@ class DashedLine(Line):
|
||||
|
||||
def generate_points(self):
|
||||
length = np.linalg.norm(self.end - self.start)
|
||||
if length == 0:
|
||||
self.add(Line(self.start, self.end))
|
||||
return self
|
||||
num_interp_points = int(length / self.dashed_segment_length)
|
||||
points = [
|
||||
interpolate(self.start, self.end, alpha)
|
||||
|
Reference in New Issue
Block a user