def approx_equal(a_value: float, b_value: float, tolerance: float = 1e-4) -> float:
    """
    Approximate equality.

    Checks if values are within a given tolerance
    of each other.

    @param a_value: a value
    @param b_value: b value
    @param tolerance:
    @return: boolean indicating values are with in given radius
    """
    return abs(a_value - b_value) <= max(abs(a_value), abs(b_value)) * tolerance