def len_similarity_score(len1: float,
                         len2: float) -> float:
    """
    Calculate how similar are two lengths.

    :param len1: First length.
    :param len2: Second length.
    :return: Length relative similarity score.
    """
    scale = len1 / len2
    if scale <= 1:
        return scale
    else:
        return 1 / scale