Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

fix problem with integer data type of start_to_end

Mirek Olšák109d2efb477f
diff --git a/topics/geometry.py b/topics/geometry.py
index 325426b15..5829ea3f6 100644
--- a/topics/geometry.py
+++ b/topics/geometry.py
@@ -85,7 +85,7 @@ class Line(VMobject):
start_to_end = self.end - self.start
length = np.linalg.norm(start_to_end)
if length > 2*self.buff:
- start_to_end /= np.linalg.norm(start_to_end)
+ start_to_end = start_to_end / np.linalg.norm(start_to_end)
self.start = self.start + self.buff*start_to_end
self.end = self.end - self.buff*start_to_end