def path_to_stop(vx, vy):
#print >> sys.stderr, "Current VX: " + str(vx)
#print >> sys.std err, "Current VY: " + str(vy)
vr = math.sqrt(abs(vx * vx) + abs(vy * vy) + 2 * abs(vx) * abs(vy))
#print >> sys.stderr, "Current VR: " + str(vr)
path = 0
while vr > MINIMUM_SPEED_FOR_BRAKE_PATH:
path = path + vr
vr = vr * SPEED_DECREASE
return round(path)
#no
coders strike back v1.py 文件源码
python
阅读 36
收藏 0
点赞 0
评论 0
评论列表
文章目录