diff --git a/effects/effect.py b/effects/effect.py index 889f598..17d34dc 100644 --- a/effects/effect.py +++ b/effects/effect.py @@ -61,13 +61,13 @@ def rainbow_surface( def transform_bounce( bounds: pg.Rect, - velocity: Tuple[int, int], + velocity: Tuple[float, float], x_factor: Tuple[float, float], y_factor: Tuple[float, float], ) -> Generator[Tuple[int, int], Tuple[int, int], None]: min_velocity = velocity[0] max_velocity = velocity[1] - current_velocity = random.randint(min_velocity, max_velocity) + current_velocity = random.uniform(min_velocity, max_velocity) phase = random.uniform(0, 360) current_x_factor = random.uniform(x_factor[0], x_factor[1]) current_y_factor = random.uniform(y_factor[0], y_factor[1]) @@ -84,7 +84,7 @@ def transform_bounce( ) phase += current_velocity / 180 * math.pi - current_velocity = random.randint(min_velocity, max_velocity) + current_velocity = random.uniform(min_velocity, max_velocity) size_x, size_y = yield (pos_x, pos_y)