Re: [Tutor] return integer from function

2012-02-22 Thread Steven D'Aprano
David Craig wrote: Hi, I have a function that calculates the distance between two points on a sphere. It works but I cant get it to return a float for use in another script. Anyone know how I do that?? You are going to have to explain what you mean in more detail. If you mean, how can you pa

Re: [Tutor] return integer from function

2012-02-22 Thread Brian van den Broek
On 22 February 2012 12:57, David Craig wrote: > Hi, > I have a function that calculates the distance between two points on a > sphere. It works but I cant get it to return a float for use in another > script. Anyone know how I do that?? > >    cos = (math.sin(phi1)*math.sin(phi2)*math.cos(theta

[Tutor] return integer from function

2012-02-22 Thread David Craig
Hi, I have a function that calculates the distance between two points on a sphere. It works but I cant get it to return a float for use in another script. Anyone know how I do that?? The function is below, Thanks, D import math def distance_on_unit_sphere(lat1, long1, lat2, long2): # Con