_filldb_private.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:tumanov_castleoaks 作者: Roamdev 项目源码 文件源码
def fetch_span(width_span, height_span, step=100):
    width_diff = sub(*reversed(width_span))
    step_count = width_diff // step
    if step_count <= 1:
        width = min(*width_span)
    else:
        width = width_span[0] + randint(0, step_count) * step

    height_diff = sub(*reversed(height_span))
    step_count = height_diff // step
    if step_count <= 1:
        height = min(*height_span)
    else:
        height = height_span[0] + randint(0, step_count) * step

    return width, height
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号