Typo fix: make_number_changable -> make_number_changeable

This commit is contained in:
Grant Sanderson 2024-03-21 10:03:41 -03:00
parent 6b3834739c
commit 7e6a37d499
2 changed files with 6 additions and 6 deletions

View file

@ -289,7 +289,7 @@ class UpdatersExample(Scene):
brace = always_redraw(Brace, square, UP)
label = TexText("Width = 0.00")
number = label.make_number_changable("0.00")
number = label.make_number_changeable("0.00")
# This ensures that the method deicmal.next_to(square)
# is called on every frame
@ -515,7 +515,7 @@ class TexAndNumbersExample(Scene):
# on them.
tex = Tex("x^2 + y^2 = 4.00")
tex.next_to(axes, UP, buff=0.5)
value = tex.make_number_changable("4.00")
value = tex.make_number_changeable("4.00")
# This will tie the right hand side of our equation to
@ -537,10 +537,10 @@ class TexAndNumbersExample(Scene):
rate_func=there_and_back,
)
# By default, tex.make_number_changable replaces the first occurance
# By default, tex.make_number_changeable replaces the first occurance
# of the number,but by passing replace_all=True it replaces all and
# returns a group of the results
exponents = tex.make_number_changable("2", replace_all=True)
exponents = tex.make_number_changeable("2", replace_all=True)
self.play(
LaggedStartMap(
FlashAround, exponents,

View file

@ -231,7 +231,7 @@ class Tex(StringMobject):
))
return re.findall(pattern, self.string)
def make_number_changable(
def make_number_changeable(
self,
value: float | int | str,
index: int = 0,
@ -241,7 +241,7 @@ class Tex(StringMobject):
substr = str(value)
parts = self.select_parts(substr)
if len(parts) == 0:
log.warning(f"{value} not found in Tex.make_number_changable call")
log.warning(f"{value} not found in Tex.make_number_changeable call")
return VMobject()
if index > len(parts) - 1:
log.warning(f"Requested {index}th occurance of {value}, but only {len(parts)} exist")