

def normalize(self):
    magnitude = self.get_magnitude()
    try:
        self.x /= magnitude
        self.y /= self
    except ZeroDivisionError:
        self.x = 0
        self.y = 0

dataset/ETHPy150Open PythonProgramming/Beginning-Game-Development-with-Python-and-Pygame/Chapter 6/gameobjects/vector2.py Vector2.normalize/VarMisuse@32/35 `magnitude`->`self`