def euc_2d(n1, n2):
    """
    The euclidean distance for 2D cartesian nodes

    :param n1: first node
    :type n1: Node
    :param n2: second node
    :type n2: Node
    :return: the euclidean distance between first node and second node in 2D space
    :rtype: float
    """
    return ((n1.x - n2.x)**2 + (n1.y - n2.y)**2)**0.5