code: def update_rotation(self, dt, buttons):
          
          assert isinstance(buttons, dict)
  
          ma = buttons['right'] - buttons['left']
          if ma != 0:
              self.stats['battery'] -= self.battery_use['angular']
              self.rotation += ma * dt * self.angular_velocity
  
          # Redirect velocity in new direction
          a = math.radians(self.rotation)
          self.impulse_dir = eu.Vector2(math.sin(a), math.cos(a))
docs: Updates rotation and impulse direction