Repository: ManimCommunity/manim
Pull request: FEAT : Add increment using += support for ValueTracker
Closes #507 

## List of Changes
- Add the `__iadd__` method for `ValueTracker`

## Motivation
Ease of use like `tracker += 3.0`

## Explanation for Changes
The `__iadd__` method in Python is used for overloading the operator `+=`

## Acknowledgement
- [x] I have read the [Contributing Guidelines](https://github.com/ManimCommunity/manim/wiki/Documentation-guidelines-(WIP))


Problem statement:
ValueTracker must support increment also using +=
Just what the title says. Here's an example 
```python
class Test(Scene):
    def construct(self):
        tracker = ValueTracker(0.0)
        tracker.set_value(2.0)
        print(tracker.get_value()) # -> 2.000
        tracker.increment_value(3.0)
        print(tracker.get_value()) # -> 5.000
        tracker += 4.0 # NEW proposed feature
        print(tracker.get_value()) # -> 9.000
```

Hints from issue discussion:
Very good idea. I would love to see a PR :) #
Hey, @huguesdevimeux I can take this if it's still open.

Commit message: Add increment using += support for ValueTracker

Patch to review:
diff --git a/manim/mobject/value_tracker.py b/manim/mobject/value_tracker.py
index 13ae1d7586..91b8d1d7b3 100644
--- a/manim/mobject/value_tracker.py
+++ b/manim/mobject/value_tracker.py
@@ -57,6 +57,9 @@ def set_value(self, value):
     def increment_value(self, d_value):
         self.set_value(self.get_value() + d_value)
 
+    def __iadd__(self, d_value):
+        return ValueTracker(self.get_value() + d_value)
+
     def interpolate(self, mobject1, mobject2, alpha, path_func=straight_path):
         """
         Turns self into an interpolation between mobject1


Code review comments:
diff_hunk: @@ -57,6 +57,9 @@ def set_value(self, value):
     def increment_value(self, d_value):
         self.set_value(self.get_value() + d_value)
 
+    def __iadd__(self, d_value):
+        return ValueTracker(self.get_value() + d_value)
path: manim/mobject/value_tracker.py
text: @user1:
I like this approach, but it creates a new instance of `ValueTracker` instead of mutating the existing one. This has two problems:
- references to the old object won't see the change
- it's inefficient to create a new object

It might be better to instead use the `increment_value` method, and then return `self`. 

@author:
Thanks for the review! That is exactly what I was trying to figure out (not creating a new `ValueTracker`). Fixed in the next commit.