Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

less index reliance on number line

Grant Sanderson4807669e0018
diff --git a/topics/number_line.py b/topics/number_line.py
index cc0c79cd3..f51c282f2 100644
--- a/topics/number_line.py
+++ b/topics/number_line.py
@@ -61,8 +61,8 @@ class NumberLine(Mobject1D):
def number_to_point(self, number):
return interpolate(
- self.points[self.index_of_left],
- self.points[self.index_of_right],
+ self.get_left(),
+ self.get_right(),
float(number-self.left_num)/(self.right_num - self.left_num)
)