def parse_libwfa_float(hook_string, data, i):
    """ Extracts a float from libwfa block
    which ends with an empty line."""
    j = 1
    dist = 0.0
    while True:
        ls = data[i+j].split()
        if len(ls) == 0:
            break
        elif hook_string in data[i+j]:
            dist = float(ls[-1])
            break
        j += 1
    return dist