Numbers

ChangingDecimal

class manimlib.animation.numbers.ChangingDecimal(decimal_mob, number_update_func, **kwargs)
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

class manimlib.animation.numbers.ChangeDecimalToValue(decimal_mob, target_number, **kwargs)
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()