Repository: ManimCommunity/manim
File: manim/mobject/value_tracker.py (Python)

Code before:
        """adds ``//=`` syntax to floor divide the value of the ValueTracker"""
        self.set_value(self.get_value() // d_value)
        return self

    def __imod__(self, d_value: Union[float, int]):
        """adds ``%=`` syntax to floor mod the value of the ValueTracker"""
        self.set_value(self.get_value() % d_value)
        return self

    def __imul__(self, d_value: Union[float, int]):
        """adds ``*=`` syntax to multiply the value of the ValueTracker"""
        self.set_value(self.get_value() * d_value)
        return self

    def __ipow__(self, d_value: Union[float, int]):
        """adds ``**=`` syntax to exponentiate the value of the ValueTracker"""
        self.set_value(self.get_value() ** d_value)
        return self

    def __isub__(self, d_value: Union[float, int]):
        """adds ``-=`` syntax to decrement the value of the ValueTracker"""
        self.increment_value(-d_value)
        return self

    def __itruediv__(self, d_value: Union[float, int]):
        """adds ``/=`` syntax to floor divide the value of the ValueTracker"""
        self.set_value(self.get_value() / d_value)
        return self

    def interpolate(self, mobject1, mobject2, alpha, path_func=straight_path):
        """
        Turns self into an interpolation between mobject1
        and mobject2.
        """
        self.points = path_func(mobject1.points, mobject2.points, alpha)
        return self


class ExponentialValueTracker(ValueTracker):
    """Operates just like ValueTracker, except it encodes the value as the
    exponential of a position coordinate, which changes how interpolation
    behaves.

    Note that ExponentialValueTracker does not handle non-positive values.

    Examples
    --------
    .. manim:: ExponentialValueTrackerExample

        class ExponentialValueTrackerExample(Scene):
            def construct(self):

Review comment (suggestion):
```suggestion
        """Sets the value of this value tracker to the current value divided by ``d_value``."""
```

Code after:
        self.points[0, 0] = value
        return self

    def increment_value(self, d_value: float):
        """Increments (adds) a scalar value  to the ValueTracker"""
        self.set_value(self.get_value() + d_value)
        return self

    def __bool__(self):
        """Return whether the value of this value tracker evaluates as true."""
        return bool(self.get_value())

    def __iadd__(self, d_value: float):
        """adds ``+=`` syntax to increment the value of the ValueTracker"""
        self.increment_value(d_value)
        return self

    def __ifloordiv__(self, d_value: float):
        """Set the value of this value tracker to the floor division of the current value by ``d_value``."""
        self.set_value(self.get_value() // d_value)
        return self

    def __imod__(self, d_value: float):
        """Set the value of this value tracker to the current value modulo ``d_value``."""
        self.set_value(self.get_value() % d_value)
        return self

    def __imul__(self, d_value: float):
        """Set the value of this value tracker to the product of the current value and ``d_value``."""
        self.set_value(self.get_value() * d_value)
        return self

    def __ipow__(self, d_value: float):
        """Set the value of this value tracker to the current value raised to the power of ``d_value``."""
        self.set_value(self.get_value() ** d_value)
        return self

    def __isub__(self, d_value: float):
        """adds ``-=`` syntax to decrement the value of the ValueTracker"""
        self.increment_value(-d_value)
        return self

    def __itruediv__(self, d_value: float):
        """Sets the value of this value tracker to the current value divided by ``d_value``."""
        self.set_value(self.get_value() / d_value)
        return self

    def interpolate(self, mobject1, mobject2, alpha, path_func=straight_path):
        """
        Turns self into an interpolation between mobject1
        and mobject2.