def _update(self, frame_no):
        # Rate limit the animation
        if frame_no % self._rate != 0:
            return

        # Function to plot.
        def f(p):
            return self._x + (self._radius * 2 - (6 * (p // 4 % 2))) * sin(
                (self._old_frame + p) * pi / 40)

        def g(p):
            return self._y + (self._radius - (3 * (p // 2 % 4))) * cos(
                (self._old_frame + p) * pi / 40)

        # Clear old wave.
        if self._old_frame != 0:
            self._screen.move(f(0), g(0))
            for x in range(81):
                self._screen.draw(f(x), g(x), char=" ")

        # Draw new one
        self._old_frame += self._direction
        self._screen.move(f(0), g(0))
        for x in range(81):
            self._screen.draw(f(x), g(x))
dataset/ETHPy150Open peterbrittain/asciimatics/asciimatics/effects.py/Cog._update/swapped operands of `%`