Files
mygame/game/utils.py
2026-05-20 20:21:27 +08:00

10 lines
132 B
Python

import math
def distance(x1, y1, x2, y2):
return math.hypot(x2 - x1, y2 - y1)
def lerp(a, b, t):
return a + (b - a) * t