def verts_equal(v0, v1, epsilon=1e-8):
    """
    Test if two given vertices are equal within a certain epsilon.

    WARNING: This is slower than ==, but it allows for a tolerance level of
    equality.
    """
    assert epsilon >= 0.0

    if len(v0) != len(v1):
        return False

    for a, b in zip(v0, v1):
        if (abs(a - b) > epsilon):
            return False
    return True