游戏可以运行
This commit is contained in:
11
card_game/utils.py
Normal file
11
card_game/utils.py
Normal file
@@ -0,0 +1,11 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user