$lat1 = 3.033555;
$lon1 = 101.87347;
$lat2 = $location['lat'];
$lon2 = $location['lon'];
$location['distance'] = (3958*3.1415926*sqrt(($lat2-$lat1)*($lat2-$lat1) + cos($lat2/57.29578)*cos($lat1/57.29578)*($lon2-$lon1)*($lon2-$lon1))/180);
Friday, March 13, 2009
Subscribe to:
Post Comments (Atom)
jap...aku nak test based on math basic...kena buka math tambahan aku :P
ReplyDelete