User Tools

Site Tools


cs_lang:python:things-to-know:geographic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
cs_lang:python:things-to-know:geographic [2012/06/20 11:17] cedriccs_lang:python:things-to-know:geographic [2012/06/20 11:18] cedric
Line 1: Line 1:
 <code python> <code python>
 +def Deg2Rad(x):
 +    """
 +    Degrees to radians.
 +    """
 +    return x * (math.pi/180)
 +
 +def Rad2Deg(x):
 +    """
 +    Radians to degress.
 +    """
 +    return x * (180/math.pi)
 +
 def EarthDistance((lat1, lon1), (lat2, lon2)): def EarthDistance((lat1, lon1), (lat2, lon2)):
     """     """
cs_lang/python/things-to-know/geographic.txt · Last modified: 2012/06/20 11:21 by cedric