function haversine, theta, degrees=degrees ;haversine function if keyword_set(degrees) then theta=theta*!dtor hav = (1.0 - cos(theta))/2.0 return,hav end