mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Allow Numberline.number_to_point to work on an array of numbers
This commit is contained in:
parent
bf2d9edfe6
commit
c3e13fff05
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ class NumberLine(Line):
|
|||
return self.ticks
|
||||
|
||||
def number_to_point(self, number):
|
||||
alpha = float(number - self.x_min) / (self.x_max - self.x_min)
|
||||
alpha = (number - self.x_min) / (self.x_max - self.x_min)
|
||||
return interpolate(self.get_start(), self.get_end(), alpha)
|
||||
|
||||
def point_to_number(self, point):
|
||||
|
|
Loading…
Add table
Reference in a new issue