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