Skip to content
Snippets Groups Projects
Commit aebcfe72 authored by Brandon Bergren's avatar Brandon Bergren
Browse files

Code style

parent ad3f15d1
No related branches found
No related tags found
No related merge requests found
<?php
// $Id$
/**
* @file
* gmap_location install routines.
*/
/**
* Implementation of hook_install().
*/
......
......@@ -57,7 +57,7 @@ function gmap_polyutil_distance($p, $lp1, $lp2) {
}
// mathematica code: (q-p1).(p2-p1)/(p2-p1).(p2-p1);
// I asked maxima, and it said ((p2y-p1y)*(qy-p1y)+(p2x-p1x)*(qx-p1x))/((p2y-p1y)^2+(p2x-p1x)^2).
$tmp = (($lp2[1]-$lp1[1])*($p[1]-$lp1[1])+($lp2[0]-$lp1[0])*($p[0]-$lp1[0]))/(pow($lp2[1]-$lp1[1],2) + pow($lp2[0]-$lp1[0], 2));
$tmp = (($lp2[1]-$lp1[1])*($p[1]-$lp1[1])+($lp2[0]-$lp1[0])*($p[0]-$lp1[0]))/(pow($lp2[1]-$lp1[1], 2) + pow($lp2[0]-$lp1[0], 2));
// Point is not alongside segment, is further off in $lp1's direction.
if ($tmp <= 0) {
return gmap_polyutil_dist($lp1, $p);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment