manhatten_distance_64 Function

private pure function manhatten_distance_64(x1, y1, x2, y2)

Manhattan distance between two ip points.

Arguments

Type IntentOptional Attributes Name
integer(kind=ip), intent(in) :: x1
integer(kind=ip), intent(in) :: y1
integer(kind=ip), intent(in) :: x2
integer(kind=ip), intent(in) :: y2

Return Value integer(kind=ip)


Called by

proc~~manhatten_distance_64~~CalledByGraph proc~manhatten_distance_64 aoc_utilities::manhatten_distance_64 interface~manhatten_distance aoc_utilities::manhatten_distance interface~manhatten_distance->proc~manhatten_distance_64 proc~go~6 problem_11::go proc~go~6->interface~manhatten_distance program~problem_11 problem_11 program~problem_11->proc~go~6

Source Code

    pure integer(ip) function manhatten_distance_64(x1,y1,x2,y2)
        integer(ip),intent(in) :: x1,y1,x2,y2
        manhatten_distance_64 = abs(x1 - x2) + abs(y1 - y2)
    end function manhatten_distance_64