function gmap_polyutil_dist in GMap Module 5
Same name and namespace in other branches
- 6.2 gmap_polyutil.inc \gmap_polyutil_dist()
- 6 gmap_polyutil.inc \gmap_polyutil_dist()
- 7.2 gmap_polyutil.inc \gmap_polyutil_dist()
- 7 gmap_polyutil.inc \gmap_polyutil_dist()
Distance in two dimensions. √((x1-x0)^2 + (y1-y0)^2)
1 call to gmap_polyutil_dist()
- gmap_polyutil_point_line_dist in ./
gmap_polyutil.inc - Distance between a point and a line segment.
File
- ./
gmap_polyutil.inc, line 54 - Encoded polyline utilities.
Code
function gmap_polyutil_dist($p1, $p2) {
return sqrt(pow($p2[0] - $p1[0], 2) + pow($p2[1] - $p1[1], 2));
}