def manhattan_distance(x1: float,
                       x2: float,
                       y1: float,
                       y2: float) -> float:
    """
    Calculates Manhattan distance (sum of distance in x and y directions)
    between (x1, y1) and (x2, y2).

    Parameters
    ----------
    x1 : float
        x-coordinate of the first point.
    x2 : float
        x-coordinate of the second point.
    y1 : float
        y-coordinate of the first point.
    y2 : float
        y-coordinate of the second point.

    Returns
    -------
    distance : float
        Manhattan distance between two points.

    References
    ----------
        - Wikipedia: https://en.wikipedia.org/wiki/Taxicab_geometry

    Examples
    --------
    .. sourcecode:: python

        >>> # Imports
        >>> from xrspatial import manhattan_distance

        >>> point_a = (142.32, 23.23)
        >>> point_b = (312.54, 432.01)

        >>> # Calculate Euclidean Distance
        >>> dist = manhattan_distance(
                point_a[0],
                point_b[0],
                point_a[1],
                point_b[1],
            )
        >>> print(dist)
        196075.9368
    """
    x = x1 - x2
    y = y1 - y2
    return abs(x) + abs(y)