Files
card/card_game/utils.py
2026-05-24 08:10:22 +08:00

12 lines
172 B
Python

"""Utility functions."""
import math
def distance(x1, y1, x2, y2):
return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
def lerp(a, b, t):
return a + (b - a) * t