Numbers¶
ChangingDecimal¶
ChangingDecimalExample¶
class ChangingDecimalExample(Scene):
def construct(self):
number = DecimalNumber(0).scale(2)
def update_func(t):
return t * 10
self.add(number)
self.wait()
self.play(ChangingDecimal(number, update_func), run_time=3)
self.wait()
ChangeDecimalToValue¶
ChangeDecimalToValueExample¶
class ChangeDecimalToValueExample(Scene):
def construct(self):
number = DecimalNumber(0).scale(2)
self.add(number)
self.wait()
self.play(ChangeDecimalToValue(number, 20), run_time=3)
self.wait()