12 function calcdist(vertices, ivert1, ivert2)
result(dist)
14 real(dp),
dimension(:, :),
intent(in) :: vertices
15 integer(I4B),
intent(in) :: ivert1
16 integer(I4B),
intent(in) :: ivert2
17 real(dp) :: dist, xdist, ydist
21 xdist = abs(vertices(1, ivert1) - vertices(1, ivert2))
22 ydist = abs(vertices(2, ivert1) - vertices(2, ivert2))
23 dist = sqrt(xdist * xdist + ydist * ydist)
35 real(dp),
intent(in) :: x0
36 real(dp),
intent(in) :: y0
37 real(dp),
intent(in) :: x1
38 real(dp),
intent(in) :: y1
39 real(dp),
intent(out) :: xcomp
40 real(dp),
intent(out) :: ycomp
41 real(dp) :: dx, dy, vmag
45 vmag = sqrt(dx**2 + dy**2)
real(dp) function, public calcdist(vertices, ivert1, ivert2)
Calculate distance between two vertices.
subroutine, public line_unit_vector(x0, y0, x1, y1, xcomp, ycomp, vmag)
Calculate distance between two vertices.
This module defines variable data types.