1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 03:58:22 +08:00

Opt: utils.py

This commit is contained in:
LmeSzinc
2020-07-07 19:54:30 +08:00
parent 1e8bafd1d8
commit 4f08f8fa2d
2 changed files with 15 additions and 1 deletions

View File

@@ -166,6 +166,18 @@ def area_cross_area(area1, area2, threshold=5):
or point_in_area((area1[2], area1[3]), area2, threshold=threshold)
def float2str(n, decimal=3):
"""
Args:
n (float):
decimal (int):
Returns:
str:
"""
return str(round(n, decimal)).ljust(decimal + 2, "0")
def point2str(x, y, length=4):
"""
Args: