Manhattan distance between two ip points.
| Type | Intent | Optional | 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 |
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