27
27
#include "ext/standard/info.h"
28
28
#include "php_geospatial.h"
29
29
30
- ZEND_BEGIN_ARG_INFO (haversine_args ,ZEND_SEND_BY_VAL )
31
- ZEND_ARG_INFO (0 ,fromLatitude )
32
- ZEND_ARG_INFO (0 ,fromLongitude )
33
- ZEND_ARG_INFO (0 ,toLatitude )
34
- ZEND_ARG_INFO (0 ,toLongitude )
35
- ZEND_ARG_INFO (0 ,radius )
30
+ ZEND_BEGIN_ARG_INFO_EX (haversine_args , 0 , 0 , 4 )
31
+ ZEND_ARG_INFO (0 , fromLatitude )
32
+ ZEND_ARG_INFO (0 , fromLongitude )
33
+ ZEND_ARG_INFO (0 , toLatitude )
34
+ ZEND_ARG_INFO (0 , toLongitude )
35
+ ZEND_ARG_INFO (0 , radius )
36
36
ZEND_END_ARG_INFO ()
37
37
38
38
/* {{{ geospatial_functions[]
@@ -97,7 +97,8 @@ PHP_MINFO_FUNCTION(geospatial)
97
97
}
98
98
/* }}} */
99
99
100
-
100
+ /* {{{ proto haversine(double fromLat, double fromLong, double toLat, double toLong [, double radius ])
101
+ * Calculates the greater circle distance between the two lattitude/longitude pairs */
101
102
PHP_FUNCTION (haversine )
102
103
{
103
104
double fromLat , fromLong , toLat , toLong , deltaLat , deltaLong ;
@@ -118,6 +119,7 @@ PHP_FUNCTION(haversine)
118
119
result = radius * 2.0 * asin (sqrt (latH + result * longH ));
119
120
RETURN_DOUBLE (result );
120
121
}
122
+ /* }}} */
121
123
122
124
/*
123
125
* Local variables:
0 commit comments