Cosmit
authorVincent Michel <vincent.michel@logilab.fr>
Tue, 13 Nov 2012 15:38:19 +0100
changeset 120 0c0679c3c537
parent 119 b47df06d0b3d
child 121 dfb4389d7e84
Cosmit
distances.py
--- a/distances.py	Tue Nov 13 15:37:59 2012 +0100
+++ b/distances.py	Tue Nov 13 15:38:19 2012 +0100
@@ -233,13 +233,13 @@
 
 
 ### GEOGRAPHICAL DISTANCES ####################################################
-def geographical(pointa, pointb, inRadians=False, planetRadius=6371009,
+def geographical(pointa, pointb, in_radians=False, planetRadius=6371009,
                  units='m'):
     """ Return the geographical distance between two points.
 
         Both points must be tuples (latitude, longitude)
 
-        - inRadians is True, if latitude and longitude are in radians, false
+        - in_radians is True, if latitude and longitude are in radians, false
           otherwise
         - planetRadius is the planet's radius in meters. By default, it's the
           Earth'one.
@@ -253,7 +253,7 @@
     difflong = pointa[1] - pointb[1]
     meanlat = (pointa[0] + pointb[0])/2.0
 
-    if not inRadians:
+    if not in_radians:
         difflat *= pi / 180.0
         difflong *= pi / 180.0
         meanlat *= pi / 180.0